Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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; rv:132.0) Gecko/20100101 Firefox/132.0
Browser:
Firefox 132
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
split
3.1M/s
match
3.0M/s
View exact numbers
Test name
Executions per second
✓
split
3,090,446 Ops/sec
match
3,002,656 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)