Script Preparation code:
AخA
 
var list = [];
for (var i = 0; i < 1000000; i++) {
  list.push ({ timestamp: Math.round (+new Date() / 1000) });
}
Tests:
  • slice

     
    var list2 = list.slice (0, 101)
  • splice

     
    list.splice(101)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    slice
    splice

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36
Chrome 99 on Linux
View result in a separate tab
Test name Executions per second
slice 5113900.0 Ops/sec
splice 7220007.5 Ops/sec