Tests:
-
original
-
ES5 replace match map
-
match without replace
-
iteration with replace
-
looping with exec
-
non regex
Rendered benchmark preparation results:
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
match without replace
2K/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 |
Do you really want to delete benchmark?