Script Preparation code:
Tests:
  • Replace

  • Replace All

  • Split+Join

  • Replace from var

  • Replace all from var

  • Split+join from var

  • Replace with template literal

  • Split+join with template literal

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Replace
    Replace All
    Split+Join
    Replace from var
    Replace all from var
    Split+join from var
    Replace with template literal
    Split+join with template literal

    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: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108 on Windows
View result in a separate tab
Test name Executions per second
Replace 11039710.0 Ops/sec
Replace All 10117030.0 Ops/sec
Split+Join 6364772.0 Ops/sec
Replace from var 10679370.0 Ops/sec
Replace all from var 9770533.0 Ops/sec
Split+join from var 5965468.0 Ops/sec
Replace with template literal 10702820.0 Ops/sec
Split+join with template literal 5896903.0 Ops/sec