Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Regex vs split/join correct
(version: 1)
Comparing performance of:
Regex vs Split and Join
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var str = '/3123/213/123/412/41/4';
Tests:
Regex
str.replace(/\//g, "$&Z");
Split and Join
str.split('/').join('/Z');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Regex
Split and Join
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:132.0) Gecko/20100101 Firefox/132.0
Browser/OS:
Firefox 132 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Regex
1341738.1 Ops/sec
Split and Join
4351575.5 Ops/sec
Related benchmarks:
Regex vs split/join22368556564
Regex vs split/join on simple case
Simple Regex vs split/join
str split vs regex replace
Test regex vs split,splice,join
Regex vs split 2
Regex vs split/includes
Regex v split/filter/join
Regex vs split/join 23313
small string split + join vs replace regex
Comments
Confirm delete:
Do you really want to delete benchmark?