Tests:
  • Replace Regex

    AخA
     
    "test of a lot  of spaces".replace(/\s+/g,"")
  • ReplaceALL

     
    "test of a lot  of spaces".replaceAll(" ","")
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Replace Regex
    ReplaceALL

    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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120 on Windows
View result in a separate tab
Test name Executions per second
Replace Regex 5424585.0 Ops/sec
ReplaceALL 5778321.5 Ops/sec