Tests:
  • for

    x
     
    var a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    var b = [];
    for (i = 0; i < a.length; i++)
    {
        b.push({"identifier" : a[i]});
    }
  • map

     
    var a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    var b = [];
    b = a.map(function(i){ return {'identifier': i}; });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for
    map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Chrome 55 on Linux
View result in a separate tab
Test name Executions per second
for 69734.3 Ops/sec
map 477325.4 Ops/sec