Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Push (forEach) vs Map
(version: 0)
Benchmark.js
Comparing performance of:
Push vs Map
Created:
2 years 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((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:
one year 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
Map
9K/s
Push
1K/s
View exact numbers
Test name
Executions per second
✓
Map
8,696 Ops/sec
Push
1,451 Ops/sec
Related benchmarks
Push vs Map
foreach push vs map
Comments
Confirm delete:
Do you really want to delete benchmark?