Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
str.match vs str.Split call
Test String.match with regex against String.split with string. We are splitting a string at the spaces.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Browser:
Firefox 121
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
String.split
8299034.5 Ops/sec
Regex.match
15086938.0 Ops/sec
Script Preparation code:
string = "CC^CONTROL_PLUGIN_AVCHAT_ONGOING_1701008141b175cec199b8195227d58bca58d18fd61ef78302"; regex = /CC\^CONTROL_PLUGIN_([A-Z]+)_([A-Z]+)/gi;
Tests:
String.split
string.split("_")
Regex.match
string.match(regex)