Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
replaceAll vs replace with /g
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:153.0) Gecko/20100101 Firefox/153.0
Browser:
Firefox 153
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
9 days ago
Benchmark engine:
Benchmark.js
replace All
26.7M/s
replace regex
17.7M/s
View exact numbers
Test name
Executions per second
✓
replace All
26,701,974 Ops/sec
replace regex
17,728,162 Ops/sec
Tests:
replace regex
"this is it".replace(/ /g, "+");
replace All
"this is it".replaceAll(" ", "+");