Script Preparation code:
Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
Literal
3.4M/s
new RegExp()
3.4M/s
Inline literal
3.4M/s
View exact numbers
  • Literal: 3,405,657 ops/sec
  • new RegExp(): 3,379,732 ops/sec
  • Inline literal: 3,371,223 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
    new RegExp()
    Literal
    Inline literal

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
Firefox 138 on Windows
View result in a separate tab
Inline literal
3.5M/s
new RegExp()
3.4M/s
Literal
3.4M/s
View exact numbers
Test name Executions per second
Inline literal 3,473,715 Ops/sec
new RegExp() 3,444,816 Ops/sec
Literal 3,384,303 Ops/sec