Script Preparation code:
AخA
 
var string = "Hello, world! This is the greatest benchmark of the world!"
Tests:
  • slice

     
    var substring = string.slice(3, 10);
  • substring

     
    var substring = string.substr(3, 7);
  • substr

     
    var substring = string.substring(3, 10);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    slice
    substring
    substr

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:59.0) Gecko/20100101 Firefox/59.0
Firefox 59 on Mac OS X 10.14
View result in a separate tab
Test name Executions per second
slice 62328180.0 Ops/sec
substring 316737920.0 Ops/sec
substr 69520296.0 Ops/sec