Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Push(forEach) vs Map
(version: 1)
Comparing performance of:
Push vs Join
Created:
one year 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(s => result.push(s))
Join
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
Join
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Browser/OS:
Firefox 136 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Push
3593.0 Ops/sec
Join
20778.8 Ops/sec
Related benchmarks:
Push vs Map
Pushy VS Mappy
Map Push vs Map return
Push vs Apply/Map
For vs Map 2
foreach push vs map
2 Map vs Push
Push (forEach) vs Map
For const of vs Map
Comments
Confirm delete:
Do you really want to delete benchmark?