Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Chrome 97
Linux
Desktop
2 years ago
Test name Executions per second
Array.prototype.slice [direct call] 5661940.5 Ops/sec
Array.prototype.slice [saved function call] 2736116.0 Ops/sec
Array.prototype.concat [direct call] 3693193.5 Ops/sec
Array.prototype.concat [saved function call] 2428240.0 Ops/sec
Spread operator 6100814.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