Script Preparation code:
Tests:

Historical Performance Data aggregated from 136 community runs

Desktop Results:
Chrome 95 runs
regex.exec
10.7M/s
string.match
10.5M/s
View exact numbers
  • regex.exec: 10,691,795 ops/sec
  • string.match: 10,508,943 ops/sec
Firefox 34 runs
regex.exec
25.1M/s
string.match
20.0M/s

Fastest: regex.exec (1.3x faster)

View exact numbers
  • regex.exec: 25,084,330 ops/sec
  • string.match: 20,016,014 ops/sec
Safari 7 runs
regex.exec
364.7M/s
string.match
86.6M/s

Fastest: regex.exec (4.2x faster)

View exact numbers
  • regex.exec: 364,713,408 ops/sec
  • string.match: 86,560,560 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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:150.0) Gecko/20100101 Firefox/150.0
Firefox 150 on Mac OS X 10.15
View result in a separate tab
regex.exec
37.1M/s
string.match
32.6M/s
View exact numbers
Test name Executions per second
regex.exec 37,144,960 Ops/sec
string.match 32,567,936 Ops/sec