Test name | Executions per second |
---|---|
Splice | 4411324.0 Ops/sec |
Slice | 4626697.5 Ops/sec |
var arrayOne = [1, 3, 5, 11, 13, 15, 3, 5, 11, 13, 15, 3, 5, 11, 13, 15, 3, 5, 11, 13, 15, 3, 5, 11, 13, 15, 3, 5, 11, 13, 15];
var index = 21;
arrayOne.splice(0, index);
arrayOne.slice(0, index)