Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Regex vs startsWith
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:148.0) Gecko/20100101 Firefox/148.0
Browser:
Firefox 148
Operating system:
Linux
Device Platform:
Desktop
Date tested:
4 months ago
startsWith
1803.8M/s
Regex
9.4M/s
View exact numbers
Test name
Executions per second
✓
startsWith
1,803,764,480 Ops/sec
Regex
9,369,164 Ops/sec
Tests:
Regex
const testString = 'QualtricsEOS|SV_7amJ2Dww8cWdtQh | FS_2zd0QZhebl4cRHT'; testString.match(/^QualtricsEOS\|(SV_[0-9a-zA-Z]{11,15})\|(FS_[0-9a-zA-Z]{11,15})$/);
startsWith
const testString = 'QualtricsEOS|SV_7amJ2Dww8cWdtQh | FS_2zd0QZhebl4cRHT'; testString.startsWith('QualtricsEOS');