Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test1234567
(version: 0)
Comparing performance of:
split-join vs regex
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
let str = 'Abcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxyAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy';
Tests:
split-join
'Abcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxyAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy'.split('\t').join(' ');
regex
'Abcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxyAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy\tAbcd\tefghij\tklmnopqrstuv\twxy'.replace(new RegExp('\t', 'g'), ' ');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
split-join
regex
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:
replace vs splitjoin
replace vs splitjoin
Multiple RegExp Replacer
Diacritics removal (+ lowercase2)
Asterisk character test
Comments
Confirm delete:
Do you really want to delete benchmark?