Run details:
Mozilla/5.0 (Linux; Android 8.0.0; SM-G930V) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.101 Mobile Safari/537.36
Chrome Mobile 75
Android 8.0.0
Mobile
5 years ago
Test name Executions per second
Array.prototype.push 4526428.0 Ops/sec
Array.prototype.concat 1.0 Ops/sec
Array spread 1.9 Ops/sec
Script Preparation code:
AخA
 
var arr = [1, 1, 1, 1, 1];
Tests:
  • Array.prototype.push

     
    arr.push(1);
  • Array.prototype.concat

     
    arr.concat(1);
  • Array spread

     
    [...arr, 1];