Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Benchmarkadawdawdwada
(version: 1)
Comparing performance of:
map-filter vs reduce
Created:
one year ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const arr = [1, 2, 3];
Tests:
map-filter
const arr = [1, 2, 3]; console.log(arr.filter((num) => num > 2).map((num) => num * 2))
reduce
const arr = [1, 2, 3]; console.log(arr.reduce((acc, num) => { if(num <= 2) return acc acc.push(num * 2) return acc }, []))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
map-filter
reduce
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 131 on Android
View result in a separate tab
Embed
Embed Benchmark Result
map-filter
127K/s
reduce
123K/s
View exact numbers
Test name
Executions per second
✓
map-filter
126,519 Ops/sec
reduce
122,555 Ops/sec
Related benchmarks
Reduce vs Filter and Map
performance of filter + map vs reduce
Comments
Confirm delete:
Do you really want to delete benchmark?