Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Some, Filter, indexOf
(version: 0)
Comparing performance of:
Array.some vs Array.filter vs Array.indexOf
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var array = []; for (var i = 0; i < 10000; i++) { array.push(i); }
Tests:
Array.some
var tempResult = array.some(v => v === 0);
Array.filter
var tempResult = array.filter(v => v === 0);
Array.indexOf
var tempResult = array.indexOf(0) > -1;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Array.some
Array.filter
Array.indexOf
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!
Related benchmarks:
array test
array test
teststest
teststest1
Clear array via array = [] vs array.length = 0
Comments
Confirm delete:
Do you really want to delete benchmark?