Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Replace vs Split
(version: 0)
Comparing performance of:
Split vs replace
Created:
8 years ago
by:
Guest
Jump to the latest result
Tests:
Split
function split(name){ return name.split('$')[1] } console.log(split('Something$ksdlaskdsa'));
replace
function replace(name){ return name.replace(/^[a-z]*\$/i,'') } console.log(replace('Something$ksdlaskdsa'));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Split
replace
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Split join vs replace
splice vs replace
Split join vs replace to slugify
Split join vs replace (fixed string)
JS replaceAll vs split+join replace
Comments
Confirm delete:
Do you really want to delete benchmark?