Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test dict find
(version: 1)
Comparing performance of:
find vs d
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
Script Preparation code:
var myArr = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; var myDict = _.keyBy(myArr);
Tests:
find
if (myArr.find((l) => l === "m")) { console.log("array has 'm'"); }
d
if (myDict['m']) { console.log("dict has 'm'"); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
find
d
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser/OS:
Chrome 130 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
find
173402.9 Ops/sec
d
178512.8 Ops/sec
Related benchmarks:
Lodash vs Lodash FP
pairs to object
Array.includes vs Dictionary lookup
array iteration vs _.each vs map vs set iteration
Array.includes vs Dictionary lookup no console
set.has vs string equals
test123kjfhneurkgewrxfiewhlrugxerg123
test of find
test dict find with rando
Comments
Confirm delete:
Do you really want to delete benchmark?