Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
replace string check
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/138.0.0.0 Safari/537.36
Browser:
Chrome 138
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
substring
233.8M/s
replace
49.3M/s
regex
41.0M/s
View exact numbers
Test name
Executions per second
✓
substring
233,790,528 Ops/sec
replace
49,321,344 Ops/sec
regex
41,042,300 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const regexReplace = (value) => { const experimentName = value.replace(/^exp_/, ''); } const replace = (value) => { const experimentName = value.replace('exp', ''); } const substring = (value) => { const experimentName = value.substring(3); }
Tests:
regex
regexReplace("exp_abc")
replace
replace("exp_abc")
substring
substring("exp_abc")