Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
str.match vs str.Split v2
(version: 1)
Test String.match with regex against String.split with string. We are splitting a string at the spaces.
Comparing performance of:
String.split vs Regex.match
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
string = "bet_me 444 444"; regex = /bet_me (\d+) (\d+)/;
Tests:
String.split
string.split(" ")
Regex.match
string.match(regex)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
String.split
Regex.match
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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
String.split
45.9M/s
Regex.match
14.9M/s
View exact numbers
Test name
Executions per second
✓
String.split
45,904,932 Ops/sec
Regex.match
14,904,537 Ops/sec
Related benchmarks
str.match vs str.Split
str.match vs str.Split(regex)
str.match vs str.Split - @
str.match vs str.Split jllj lpk
Comments
Confirm delete:
Do you really want to delete benchmark?