Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS some vs Lodash some with callback vs Lodash some with object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
JS some
99431.5 Ops/sec
Lodash some with callback
165088.2 Ops/sec
Lodash some with object
27756.0 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js'></script>
Script Preparation code:
const array = Array(10000).fill(0).map((_, idx) => ({x: idx}));
Tests:
JS some
const found = array.some(s => s.x === 80000);
Lodash some with callback
const found = _.some(array, s => s.x === 8000);
Lodash some with object
const found = _.some(array, {x: 8000});