Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Linux
Desktop
one year ago
string.replace
6.2M/s
regexp.exec
4.3M/s
regexp.matchAll
2.4M/s
View exact numbers
Test name Executions per second
string.replace 6,186,792 Ops/sec
regexp.exec 4,331,134 Ops/sec
regexp.matchAll 2,388,659 Ops/sec
Tests: