Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
vanilla js replaceAll vs regex replace tabs to spaces
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser:
Chrome 135
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
replace regex
14.4M/s
replace All
10.1M/s
View exact numbers
Test name
Executions per second
✓
replace regex
14,381,968 Ops/sec
replace All
10,059,229 Ops/sec
Tests:
replace regex
" \t asdf \t ".replace(/\t/g, " ");
replace All
" \t asdf \t ".replaceAll("\t", " ");