Script Preparation code:
AخA
 
var reConstructor = new RegExp('^[0-9a-fA-F]{24}$')
var reSimpleConstructor = RegExp('^[0-9a-fA-F]{24}$')
var reLiteral = /^[0-9a-fA-F]{24}$/
Tests:
  • new Regex

     
    reConstructor.test('132abc67219f019afe12901a')
  • Regex

     
    reSimpleConstructor.test('132abc67219f019afe12901a')
  • Literal

     
    reLiteral.test('132abc67219f019afe12901a')
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    new Regex
    Regex
    Literal

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Chrome 83 on Mac OS X 10.13.6
View result in a separate tab
Test name Executions per second
new Regex 6069228.5 Ops/sec
Regex 6228227.5 Ops/sec
Literal 6129453.0 Ops/sec