Script Preparation code:
Tests:

Historical Performance Data aggregated from 234 community runs

Desktop Results:
Chrome 171 runs
String.split
10.9M/s
Regex.match
1.6M/s

Fastest: String.split (6.6x faster)

View exact numbers
  • String.split: 10,912,101 ops/sec
  • Regex.match: 1,641,791 ops/sec
Firefox 46 runs
String.split
3.7M/s
Regex.match
2.0M/s

Fastest: String.split (1.8x faster)

View exact numbers
  • String.split: 3,674,074 ops/sec
  • Regex.match: 2,003,800 ops/sec
Safari 11 runs
String.split
15.6M/s
Regex.match
2.5M/s

Fastest: String.split (6.2x faster)

View exact numbers
  • String.split: 15,572,216 ops/sec
  • Regex.match: 2,502,902 ops/sec
Mobile Results:
Chrome 6 runs
String.split
8.1M/s
Regex.match
1.2M/s

Fastest: String.split (6.9x faster)

View exact numbers
  • String.split: 8,095,283 ops/sec
  • Regex.match: 1,169,749 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
    Regex.match

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Chrome 138 on Windows
View result in a separate tab
String.split
12.3M/s
Regex.match
1.6M/s
View exact numbers
Test name Executions per second
String.split 12,348,868 Ops/sec
Regex.match 1,609,296 Ops/sec