Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
RegEx.match vs. startWith2
a
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
Browser:
Firefox 135
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
startsWith
1977.3M/s
String.startsWith
1972.9M/s
String.match
39.2M/s
View exact numbers
Test name
Executions per second
✓
startsWith
1,977,266,048 Ops/sec
String.startsWith
1,972,865,920 Ops/sec
String.match
39,209,064 Ops/sec
Script Preparation code:
var string = "Hello world!"; var regex = /Hello/;
Tests:
String.startsWith
string.startsWith("Hello");
String.match
string.match(regex);
startsWith
string.startsWith("Hello");