Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Linux
Desktop
3 months ago
Test name Executions per second
.first() 599524.4 Ops/sec
:first 380807.5 Ops/sec
.filter(:first) 430168.0 Ops/sec
.eq(0) 621655.3 Ops/sec
$(.get(0)) 552587.4 Ops/sec
$([0]) 546567.4 Ops/sec
HTML Preparation code:
Tests:
  • .first()

  • :first

  • .filter(:first)

  • .eq(0)

  • $(.get(0))

  • $([0])