Script Preparation code:
Tests:

Historical Performance Data aggregated from 13 community runs

Desktop Results:
Chrome 13 runs
String.slice
163.1M/s
String.replace
34.6M/s
String.split
33.5M/s
RegEx.exec
27.2M/s
String.match
25.8M/s

Fastest: String.slice (6.3x faster)

View exact numbers
  • String.slice: 163,074,672 ops/sec
  • String.replace: 34,559,544 ops/sec
  • String.split: 33,474,470 ops/sec
  • RegEx.exec: 27,222,010 ops/sec
  • String.match: 25,821,366 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
    String.split
    String.match
    RegEx.exec
    String.replace
    String.slice

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Windows
View result in a separate tab
String.slice
183.0M/s
String.replace
16.1M/s
String.split
14.7M/s
RegEx.exec
8.2M/s
String.match
7.8M/s
View exact numbers
Test name Executions per second
String.slice 183,033,472 Ops/sec
String.replace 16,088,545 Ops/sec
String.split 14,672,105 Ops/sec
RegEx.exec 8,198,714 Ops/sec
String.match 7,844,672 Ops/sec