Script Preparation code:
Tests:

Historical Performance Data aggregated from 201 community runs

Desktop Results:
Chrome 154 runs
substr
120.0M/s
substring
114.5M/s
slice
114.1M/s
split
24.0M/s

Fastest: substr (5.0x faster)

View exact numbers
  • substr: 119,959,200 ops/sec
  • substring: 114,542,240 ops/sec
  • slice: 114,054,272 ops/sec
  • split: 23,993,280 ops/sec
Firefox 29 runs
substring
848.9M/s
slice
810.0M/s
substr
745.5M/s
split
11.1M/s

Fastest: substring (76.5x faster)

View exact numbers
  • substring: 848,871,872 ops/sec
  • slice: 809,976,640 ops/sec
  • substr: 745,523,136 ops/sec
  • split: 11,093,176 ops/sec
Safari 7 runs
substring
326.8M/s
slice
309.6M/s
substr
42.7M/s
split
21.0M/s

Fastest: substring (15.5x faster)

View exact numbers
  • substring: 326,781,728 ops/sec
  • slice: 309,647,712 ops/sec
  • substr: 42,668,992 ops/sec
  • split: 21,036,874 ops/sec
Other 5 runs
substring
20.2M/s
substr
20.1M/s
slice
20.1M/s
split
13.3M/s

Fastest: substring (1.5x faster)

View exact numbers
  • substring: 20,200,444 ops/sec
  • substr: 20,138,356 ops/sec
  • slice: 20,121,070 ops/sec
  • split: 13,313,145 ops/sec
Mobile Results:
Chrome 6 runs
substr
28.8M/s
slice
28.2M/s
substring
27.3M/s
split
8.8M/s

Fastest: substr (3.3x faster)

View exact numbers
  • substr: 28,847,120 ops/sec
  • slice: 28,241,158 ops/sec
  • substring: 27,298,940 ops/sec
  • split: 8,782,078 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
    slice
    substring
    substr
    split

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 14 days ago)
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Edg/109.0.1518.140
Chrome 109 on Windows 7
View result in a separate tab
substr
121.3M/s
slice
113.7M/s
substring
74.1M/s
split
2.7M/s
View exact numbers
Test name Executions per second
substr 121,317,592 Ops/sec
slice 113,722,504 Ops/sec
substring 74,090,368 Ops/sec
split 2,684,116 Ops/sec