Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Some vs. Any
(version: 0)
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.
Comparing performance of:
Some (Non-Existing Value) vs Any (Non-Existing Value) vs Some (Existing Value) vs Any (Existing Value)
Created:
one year ago
by:
Guest
Jump to the latest result
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);
Any (Non-Existing Value)
array.any(value => value !== 20);
Some (Existing Value)
!array.some(value => value === 10);
Any (Existing Value)
array.any(value => value !== 10);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Some (Non-Existing Value)
Any (Non-Existing Value)
Some (Existing Value)
Any (Existing Value)
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?