Script Preparation code:
AخA
 
var string = "Hello World!"
Tests:
  • slice

     
    string.slice(0, string.length - 7) 
  • substr

     
    string.substr(0, string.length - 7) 
  • substring

     
    string.substring(0, string.length - 7) 
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    slice
    substr
    substring

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0
Firefox 115 on Ubuntu
View result in a separate tab
Test name Executions per second
slice 96761416.0 Ops/sec
substr 100792856.0 Ops/sec
substring 95212624.0 Ops/sec