Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS Some vs Includes
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/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36
Browser:
Yandex Browser 24
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Some
2267.3 Ops/sec
Includes
8859.1 Ops/sec
Script Preparation code:
var testArray = []; for (var i = 0; i < 10000; i++) { var n = Math.floor(Math.random() * 100); testArray.push({ id: n, text: "hello" }); }
Tests:
Some
testArray.find(x => !testArray.some(y => y.id == 23));
Includes
var ids = testArray.map(x => x.id); testArray.find(x => !ids.includes(23));