Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    String.replace()
    String.replaceAll()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 11 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0
Firefox 142 on Windows
View result in a separate tab
String.replaceAll()
33.9M/s
String.replace()
19.2M/s
View exact numbers
Test name Executions per second
String.replaceAll() 33,867,504 Ops/sec
String.replace() 19,196,230 Ops/sec