Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
aze a eqsaze qsd
aze
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
some
200958.0 Ops/sec
find
192906.8 Ops/sec
map indexOf
50781.1 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var hasZero = []; var withoutZero = []; for (var i = 0; i < 10000; i++) { hasZero.push({a: Math.floor(Math.random() * 1000)}); withoutZero.push({a: Math.floor(Math.random() * 1000) + 1}) }
Tests:
some
var tempResult = !!Math.round(Math.random()) ? hasZero.some(v => v.a === 0) : withoutZero.some(v => v.a === 0);
find
var tempResult = !!Math.round(Math.random()) ? hasZero.some(v => v.a === 0) : withoutZero.find(v => v.a === 0);
map indexOf
var tempResult = !!Math.round(Math.random()) ? hasZero.map(v => v.a).indexOf(0) > -1 : withoutZero.map(v => v.a).indexOf(0) > -1;