Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Linux
Desktop
6 months ago
Test name Executions per second
.first() 388886.8 Ops/sec
:first 268938.0 Ops/sec
.filter(:first) 276168.1 Ops/sec
.eq(0) 387300.0 Ops/sec
$(.get(0)) 370078.5 Ops/sec
$([0]) 395393.8 Ops/sec
HTML Preparation code:
Tests:
  • .first()

  • :first

  • .filter(:first)

  • .eq(0)

  • $(.get(0))

  • $([0])