Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JS array methods co za chuj
(version: 5)
Comparing performance of:
filter vs some vs every vs map
Created:
3 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var collection = Array.from({length: 10000}, () => Math.round(Math.random())); console.log(collection);
Tests:
filter
const result = collection.filter(num => num === 0);
some
const result = collection.some(num => num === 0);
every
const result = collection.every(num => num === 0);
map
const result = collection.map(num => num === 0);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
filter
some
every
map
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:
Fill array with random integers
lodash.round VS Math.round with precision
hui's test case for round
roudning
lodash.round VS Math.round (2 decimal places)
Comments
Confirm delete:
Do you really want to delete benchmark?