Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Push (forEach) vs Map
(version: 0)
Comparing performance of:
Push vs Map
Created:
2 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var strs = Array.from(new Array(10000)).map(() => 'String concat. ') var result = []
Tests:
Push
strs.forEach((str) => { result.push(str); })
Map
result = strs.map((a) => a)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Push
Map
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
8 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser/OS:
Firefox 142 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Push
1451.4 Ops/sec
Map
8695.7 Ops/sec
Related benchmarks:
Push vs Map
Map Push vs Map return
Push vs Apply/Map
foreach push vs map
Comments
Confirm delete:
Do you really want to delete benchmark?