Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Is Some faster than !!find
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Find
9.1 Ops/sec
Some
9.8 Ops/sec
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.core.js"></script>
Script Preparation code:
const largerArray = Array.from({ length: 10000000 }, (_, index) => `Element${index}`); // Add the 'bc' element at the end of the array largerArray.push('bc');
Tests:
Find
const largerArray = []; for (let i = 0; i < 1000000; i++) { largerArray.push('Element' + i); } // Add the 'bc' element at the end of the array largerArray.push('bc'); var b = !!largerArray.find(item => item === 'bc');
Some
const largerArray = []; for (let i = 0; i < 1000000; i++) { largerArray.push('Element' + i); } // Add the 'bc' element at the end of the array largerArray.push('bc'); var b = largerArray.some(item => item === 'bc');