Script Preparation code:
Tests:
  • Match RegEx via Lookahead and Capture Group

  • Replace Unwanted Parts with Replace RegEx

  • String Split and Reference Array Index with length -1 (const intermediate)

  • String Split and Reference Array Index with length -1 (var intermediate)

  • String Split and Reference Array Index with length -1 (no intermediate var)

  • String Split with pop

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Match RegEx via Lookahead and Capture Group
    Replace Unwanted Parts with Replace RegEx
    String Split and Reference Array Index with length -1 (const intermediate)
    String Split and Reference Array Index with length -1 (var intermediate)
    String Split and Reference Array Index with length -1 (no intermediate var)
    String Split with pop

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36
Chrome 84 on Windows
View result in a separate tab
Test name Executions per second
Match RegEx via Lookahead and Capture Group 1620663.0 Ops/sec
Replace Unwanted Parts with Replace RegEx 103375.3 Ops/sec
String Split and Reference Array Index with length -1 (const intermediate) 3298802.0 Ops/sec
String Split and Reference Array Index with length -1 (var intermediate) 3140514.0 Ops/sec
String Split and Reference Array Index with length -1 (no intermediate var) 3305088.0 Ops/sec
String Split with pop 3310778.0 Ops/sec