Script Preparation code:
AخA
 
var example = 'there is no spoon'
Tests:
  • slice

     
    var result = example.slice(1,-1)
  • substr

     
    var result = example.substring(1, example.length-1)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    slice
    substr

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 29 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
slice 205809056.0 Ops/sec
substr 187596448.0 Ops/sec