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 with basic function

     
    var a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    var b = [];
    b = a.map(function(i){ return {"identifier": i}; });
  • map with fat arrow function

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

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for
    map with basic function
    map with fat arrow function

    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 67590.4 Ops/sec
map with basic function 485257.5 Ops/sec
map with fat arrow function 484260.1 Ops/sec