Tests:
  • Array.prototype.concat

    AخA
     
    var params = [ { 'ten': 10 }, { 'six': 6 }, {'nested': { 'five': 5 }} ];
    var other = [ { 'one': 1 }, { 'two': 2 } ].concat(params);
  • spread operator (spread at head)

     
    var params = [ { 'ten': 10 }, { 'six': 6 }, {'nested': { 'five': 5 }} ];
    var other = [ ...params, { 'one': 1 }, { 'two': 2 } ];
  • spread operator (spread at tail)

     
    var params = [ { 'ten': 10 }, { 'six': 6 }, {'nested': { 'five': 5 }} ];
    var other = [ { 'one': 1 }, { 'two': 2 }, ...params ];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.concat
    spread operator (spread at head)
    spread operator (spread at tail)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/102.0.5005.87 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 102 on iOS 15.5
View result in a separate tab
Test name Executions per second
Array.prototype.concat 17643870.0 Ops/sec
spread operator (spread at head) 23375752.0 Ops/sec
spread operator (spread at tail) 23330750.0 Ops/sec