Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
replaceAll vs replace with global
(version: 1)
Comparing performance of:
replace regex vs replace All
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
replace regex
"<CLNR><CR>光の中では見えないもの<CLNR><CR>が、暗闇の中ではよく<CR><CLGR>見える".replace(/<CLNR><CR>|<CR><CLGR>/g, "\r\n");
replace All
"<CLNR><CR>光の中では見えないもの<CLNR><CR>が、暗闇の中ではよく<CR><CLGR>見える".replaceAll(/<CLNR><CR>|<CR><CLGR>/g, "\r\n");
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
replace regex
replace All
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Browser/OS:
Firefox 134 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
replace regex
9.3M/s
replace All
7.7M/s
View exact numbers
Test name
Executions per second
✓
replace regex
9,322,514 Ops/sec
replace All
7,651,069 Ops/sec
Comments
Confirm delete:
Do you really want to delete benchmark?