Script Preparation code:
Tests:

Historical Performance Data aggregated from 9 community runs

Desktop Results:
Chrome 9 runs
String.includes
79.8M/s
RegEx.test
33.7M/s
String.match
9.7M/s

Fastest: String.includes (8.2x faster)

View exact numbers
  • String.includes: 79,800,344 ops/sec
  • RegEx.test: 33,680,112 ops/sec
  • String.match: 9,673,724 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.test
    String.includes
    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:151.0) Gecko/20100101 Firefox/151.0
Firefox 151 on Mac OS X 10.15
View result in a separate tab
String.includes
2175.1M/s
RegEx.test
50.0M/s
String.match
32.8M/s
View exact numbers
Test name Executions per second
String.includes 2,175,077,632 Ops/sec
RegEx.test 50,022,600 Ops/sec
String.match 32,797,294 Ops/sec