Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0
Firefox 80
Fedora
Desktop
4 years ago
Test name Executions per second
Splice 21464068.0 Ops/sec
Slice 8300495.5 Ops/sec
Script Preparation code:
AخA
 
var arrayOne = [1, 3, 5, 11, 13];
var index = arrayOne.indexOf(5);
Tests:
  • Splice

     
    arrayOne.splice(index, 1);
  • Slice

     
    [...arrayOne.slice(0, index), ...arrayOne.slice(index+1) ]