Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
includes vs substring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:143.0) Gecko/20100101 Firefox/143.0
Browser:
Firefox 143
Operating system:
Linux
Device Platform:
Desktop
Date tested:
4 months ago
startsWith
980.9M/s
substr
975.3M/s
View exact numbers
Test name
Executions per second
✓
startsWith
980,868,864 Ops/sec
substr
975,338,880 Ops/sec
Tests:
startsWith
const str = "https://firebase.com/this/is/a/long/thing" str.includes("https://firebase")
substr
const str = "https://firebase.com/this/is/a/long/thing" const subStr = str.substring(0, 16); str === subStr