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
Test name
Executions per second
String.startsWith
1972865920.0 Ops/sec
String.match
39209064.0 Ops/sec
startsWith
1977266048.0 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");