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
Jump 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
Test name
Executions per second
split & join
4658516.5 Ops/sec
replace
5733308.0 Ops/sec
Related benchmarks:
replace vs split & join
Split join vs replace
Split join vs replace statics
Split+join vs replaceAll
Split+join vs replace vs replaceAll
Replace spaces: split/join vs regex replace
split join vs regex global replace
Split join vs replace to slugify
Split join vs replace (fixed string)
Comments
Confirm delete:
Do you really want to delete benchmark?