Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
split & join vs replace
(version: 1)
Comparing performance of:
split & join vs replace
Created:
one year ago
by:
Registered User
Go to the latest result
Script Preparation code:
const address = '10 Downing Street,London,UK,SW10'
Tests:
split & join
address.split(',').join(', ')
replace
address.replace(/,/g, ', ')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
split & join
replace
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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Browser/OS:
Chrome 118 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
replace
5.7M/s
split & join
4.7M/s
View exact numbers
Test name
Executions per second
✓
replace
5,733,308 Ops/sec
split & join
4,658,516 Ops/sec
Related benchmarks
Split join vs replace
Split+join vs replace vs replaceAll
Comments
Confirm delete:
Do you really want to delete benchmark?