Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Split vs Regex on URL params
(version: 1)
Comparing performance of:
Split vs Regex
Created:
6 months ago
by:
Guest
Go to the latest result
Script Preparation code:
let key = "filters.0.region=AU&filters.0.region=US"
Tests:
Split
key.split('.')
Regex
key.match(/^filters\[(\d+)\]\.(\w+)\.(min|max)$/)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Split
Regex
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Browser/OS:
Chrome 144 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Regex
49.0M/s
Split
41.4M/s
View exact numbers
Test name
Executions per second
✓
Regex
49,036,900 Ops/sec
Split
41,437,400 Ops/sec
Related benchmarks
get last element of path: split vs regex
Regex v split/filter/join
Js Split vs Regex
Comments
Confirm delete:
Do you really want to delete benchmark?