Script Preparation code:
Tests:

Historical Performance Data aggregated from 29 community runs

Desktop Results:
Chrome 17 runs
Substring
8.9M/s
Substr
8.7M/s
Slice
8.2M/s
View exact numbers
  • Substring: 8,905,709 ops/sec
  • Substr: 8,690,238 ops/sec
  • Slice: 8,232,904 ops/sec
Firefox 12 runs
Substr
163.4M/s
Substring
148.4M/s
Slice
144.6M/s

Fastest: Substr (1.1x faster)

View exact numbers
  • Substr: 163,383,440 ops/sec
  • Substring: 148,422,336 ops/sec
  • Slice: 144,576,544 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Substring
    Slice
    Substr

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36 Edg/146.0.0.0
Chrome 146 on Windows
View result in a separate tab
Slice
10.6M/s
Substring
10.4M/s
Substr
10.3M/s
View exact numbers
Test name Executions per second
Slice 10,619,444 Ops/sec
Substring 10,401,095 Ops/sec
Substr 10,283,436 Ops/sec