Tests:
-
.first()
-
:first
-
.filter(:first)
-
.eq(0)
-
$(.get(0))
-
$([0])
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
6 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Firefox 148 on Windows
View result in a separate tab
View exact numbers
| Test name |
Executions per second |
|
✓
.first()
|
908,435 Ops/sec |
|
$(.get(0))
|
907,098 Ops/sec |
|
$([0])
|
875,742 Ops/sec |
|
.eq(0)
|
830,688 Ops/sec |
|
.filter(:first)
|
573,988 Ops/sec |
|
:first
|
472,870 Ops/sec |
Do you really want to delete benchmark?