Tests:
  • replace

    AخA
     
    const test = 'test test test test';
    const result = test.replace(/test/g, 'hello');
  • replaceAll

     
    const test = 'test test test test';
    const result = test.replaceAll(/test/g, 'hello');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    replace
    replaceAll

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Firefox 113 on Linux
View result in a separate tab
Test name Executions per second
replace 5869548.5 Ops/sec
replaceAll 4948280.5 Ops/sec