Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36
Chrome 78
Linux
Desktop
5 years ago
Test name Executions per second
Array.prototype.slice [direct call] 5260393.5 Ops/sec
Array.prototype.slice [saved function call] 2790855.5 Ops/sec
Array.prototype.concat [direct call] 2775820.5 Ops/sec
Array.prototype.concat [saved function call] 1959577.5 Ops/sec
Spread operator 5138186.0 Ops/sec
Script Preparation code:
Tests:
  • Array.prototype.slice [direct call]

  • Array.prototype.slice [saved function call]

  • Array.prototype.concat [direct call]

  • Array.prototype.concat [saved function call]

  • Spread operator