Temp11111111111111111111111111111111111111111111111111111111

4 years ago
User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36
Test name Executions per second
slice 82.5 Ops/sec
splice 1331.7 Ops/sec
shift 27207.1 Ops/sec
Tests:
  • slice

    AخA
     
    var list = [];
    for (var i = 0; i < 1000 * 1000; i++) {
      list.push(i);
    }
  • splice

     
    var list = [];
    for (var i = 0; i < 1000 * 100; i++) {
      list.push(i);
    }
  • shift

     
    var list = [];
    for (var i = 0; i < 1000 * 10; i++) {
      list.push(i);
    }
Open this result on MeasureThat.net