Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JavaScript string split vs match using regex
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 YaBrowser/24.6.0.0 Safari/537.36
Browser:
Yandex Browser 24
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
split
2894749.8 Ops/sec
match
2518115.2 Ops/sec
Script Preparation code:
string = "This benchmark is testing if split or match is faster on a string using regex"; regex = /\S+/gi;
Tests:
split
string.split(regex)
match
string.match(regex)