Script Preparation code:
Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
regex.test
12.6M/s
regex.exec
11.3M/s
string.match
11.1M/s
regex.match
7.0M/s

Fastest: regex.test (1.8x faster)

View exact numbers
  • regex.test: 12,607,750 ops/sec
  • regex.exec: 11,274,996 ops/sec
  • string.match: 11,098,955 ops/sec
  • regex.match: 6,981,392 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
    regex.exec
    string.match
    regex.test
    regex.match

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Mac OS X 10.15.7
View result in a separate tab
regex.test
53.0M/s
regex.exec
36.0M/s
string.match
33.0M/s
regex.match
32.6M/s
View exact numbers
Test name Executions per second
regex.test 53,020,044 Ops/sec
regex.exec 35,986,604 Ops/sec
string.match 32,954,548 Ops/sec
regex.match 32,622,132 Ops/sec