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:
one month ago
Test name
Executions per second
startsWith
980868864.0 Ops/sec
substr
975338880.0 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