Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Firefox 57
Windows 7
Other
2025 years ago
Test name Executions per second
.first() 71204.2 Ops/sec
:first 50493.7 Ops/sec
.filter(:first) 58121.7 Ops/sec
.eq(0) 69744.6 Ops/sec
$(.get(0)) 71152.6 Ops/sec
$([0]) 70859.1 Ops/sec
HTML Preparation code:
Tests:
  • .first()

  • :first

  • .filter(:first)

  • .eq(0)

  • $(.get(0))

  • $([0])


;