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:
17 days ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Safari/605.1.15
Browser/OS:
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Regex
826652864.0 Ops/sec
Split and Join
10580247.0 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?