Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
String.Split and String.Match
We are testing String.split with a string input against String.match with a regex input, both will output an array.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0
Browser:
Firefox 146
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
3 months ago
Test name
Executions per second
String.split
2671643.2 Ops/sec
String.match
1453464.5 Ops/sec
Script Preparation code:
string = "This benchmark is to ask the ageold question, will it fast? We are splitting a string at spaces with two methods."; regex = /\S+/gi;
Tests:
String.split
string.split(" ")
String.match
string.match(regex)