Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test2323
(version: 0)
Comparing performance of:
test1 vs test2
Created:
3 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var test = []; for(let i = 0; i < 100000; i ++) { test.push({id: i, value: 300 + i}); }
Tests:
test1
test.filter((data) => data.value > 3000).map((data) => { return {...data, checkValue: true}});
test2
test.reduce((acc, data) => { if(data.value > 3000) { acc.push({...data, checkValue: true}); } return acc; }, []);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
test1
test2
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
Spread or Push
fill vs push
fill vs push multiple
Comments
Confirm delete:
Do you really want to delete benchmark?