Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
[0] vs first vs at 0
(version: 1)
Comparing performance of:
[0] vs first vs at 0
Created:
10 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var array = ['banana', 'sausage', 'jesus', 'sausage', 'jesus', 'sausage', 'jesus', 'sausage', 'jesus', 'sausage', 'jesus', 'sausage', 'jesus']
Tests:
[0]
array[0]
first
_.first(array)
at 0
array.at(0)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
[0]
first
at 0
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
10 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser/OS:
Chrome 137 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
[0]
135025296.0 Ops/sec
first
119352040.0 Ops/sec
at 0
111563928.0 Ops/sec
Related benchmarks:
IndexOf vs Includes vs lodash includes
IndexOf vs Includes vs lodash includes vs lodash indexOf
length -1 vs last
IndexOf vs Includes vs lodash includes vs manual check
indexOf vs _.indexOf
array IndexOf vs array Includes vs lodash indexOf
Lodash _.first vs array[0]
lodash includes vs has
length -1 vs last vs at -1
Comments
Confirm delete:
Do you really want to delete benchmark?