Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
obj di vs array find
(version: 1)
Comparing performance of:
obj id vs arr find
Created:
5 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
obj = { a: { id: 'a'}, b: { id: 'b'}, c: { id: 'c'}, d: { id: 'd'}, e: { id: 'e'}, f: { id: 'f'}}; arr = [ {id: 'a'}, {id: 'b'}, {id: 'c'}, {id: 'd'}, {id: 'e'}, {id: 'f'} ];
Tests:
obj id
obj['f'];
arr find
arr.find(el => el.id === 'f');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
obj id
arr find
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
5 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser/OS:
Chrome 142 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
obj id
168507584.0 Ops/sec
arr find
83062720.0 Ops/sec
Related benchmarks:
find vs some vs every
find vs some vs every forkedyo
array find vs object index
Associative object array VS array.find
Associative object array VS array.find
Object direct vs Array.indexOf vs Array.find vs Map.has
find vs some vs every vs for (break) vs for (return)
Array-Map + Set.has vs Array.Find
Array-Map + Set.has vs Array.Find 2
Comments
Confirm delete:
Do you really want to delete benchmark?