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
Jump 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
Test name
Executions per second
String.split
45904932.0 Ops/sec
Regex.match
14904537.0 Ops/sec
Related benchmarks:
str.match vs str.Split
str.match vs str.Split first result
str.match vs str.Split(regex)
str.match vs str.Split33
str.match vs str.Split 1
str.match vs str.Split in regex
str.match vs str.Split long string
str.match vs str.Split - @
str.match vs str.Split jllj lpk
Comments
Confirm delete:
Do you really want to delete benchmark?