Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Some vs. Every Includes
Check if NOT some members of an array equal a value vs. checking if all values in an array aren't equal to a value.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/120.0.6099.119 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 120
Operating system:
iOS 17.2
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
Some (Non-Existing Value)
11163799.0 Ops/sec
Every (Non-Existing Value)
10613557.0 Ops/sec
Some (Existing Value)
13546239.0 Ops/sec
Every (Existing Value)
11696356.0 Ops/sec
Script Preparation code:
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
Tests:
Some (Non-Existing Value)
!array.some(value => value === 20);
Every (Non-Existing Value)
array.every(value => value !== 20);
Some (Existing Value)
!array.some(value => value === 10);
Every (Existing Value)
array.every(value => value !== 10);