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
Go 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
Join
21K/s
Push
4K/s
View exact numbers
Test name
Executions per second
✓
Join
20,779 Ops/sec
Push
3,593 Ops/sec
Related benchmarks
Push vs Map
Pushy VS Mappy
foreach push vs map
Push (forEach) vs Map
For const of vs Map
Comments
Confirm delete:
Do you really want to delete benchmark?