Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
foreach vs map-forr
(version: 0)
----
Comparing performance of:
map vs for of transpiled
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var resul = []; for (let i = 0; i < 200000; ++i) { resul.push({ label: `round ${i}`, main: `well done ${i+2}`, extra: 'not needed', }); }
Tests:
map
var res = resul.map(x => { return { mylabel: x.label, mymain: x.main } });
for of transpiled
var result = new Array(resul.length); for (let i = 0; i < resul.length; ++i) { result[i] = { mylabel: resul[i].label, mymain: resul[i].main } }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
map
for of transpiled
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
for vs map
map vs forEach Chris
for vs foreach vs map 2
Foreach&Push vs Map2
flatmap vs for of
Comments
Confirm delete:
Do you really want to delete benchmark?