Script Preparation code:
Tests:
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    original
    ES5 replace match map
    match without replace
    iteration with replace
    looping with exec
    non regex

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.7 Mobile/15E148 Safari/604.1
Mobile Safari 17 on iOS 17.7
View result in a separate tab
non regex
7K/s
original
2K/s
match without replace
2K/s
looping with exec
1K/s
ES5 replace match map
1K/s
iteration with replace
983/s
View exact numbers
Test name Executions per second
non regex 6,824 Ops/sec
original 2,049 Ops/sec
match without replace 1,882 Ops/sec
looping with exec 1,110 Ops/sec
ES5 replace match map 1,034 Ops/sec
iteration with replace 983 Ops/sec