Script Preparation code:
AخA
 
var loremString = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
var unneededNonCaptureRE = /(?:z)+/
var noNonCaptureRE = /z+/
var anotherUnneededNonCapture = /lab(?:o)rum/
var anotherNoNonCapture = /laborum/
Tests:
  • unneededNonCaptureRE

     
    unneededNonCaptureRE.lastIndex = 0
    unneededNonCaptureRE.exec(loremString)
  • noNonCaptureRE

     
    noNonCaptureRE.lastIndex = 0
    noNonCaptureRE.exec(loremString)
  • anotherUnneededNonCapture

     
    anotherUnneededNonCapture.lastIndex = 0
    anotherUnneededNonCapture.exec(loremString)
  • anotherNoNonCapture

     
    anotherNoNonCapture.lastIndex = 0
    anotherNoNonCapture.exec(loremString)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    unneededNonCaptureRE
    noNonCaptureRE
    anotherUnneededNonCapture
    anotherNoNonCapture

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95 on Ubuntu
View result in a separate tab
Test name Executions per second
unneededNonCaptureRE 2084003.0 Ops/sec
noNonCaptureRE 2246493.8 Ops/sec
anotherUnneededNonCapture 3582986.2 Ops/sec
anotherNoNonCapture 2785470.2 Ops/sec