Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Performance of includes vs startsWith
Test performance of includes vs startsWith
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Browser:
Chrome 126
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
includes (start of input)
174792592.0 Ops/sec
includes (end of input)
176445104.0 Ops/sec
startsWith (start of input)
82890240.0 Ops/sec
startsWith (end of input)
104885120.0 Ops/sec
Tests:
includes (start of input)
const str = "https://www.google.com/this/is/a/long/url/and/we/are/going/to/try/to/find/the/start/of/it" str.includes("https")
includes (end of input)
const str = "https://www.google.com/this/is/a/long/url/and/we/are/going/to/try/to/find/the/end-of-it" str.includes("end-of-it")
startsWith (start of input)
const str = "https://www.google.com/this/is/a/long/url/and/we/are/going/to/try/to/find/the/start/of/it" str.startsWith("https")
startsWith (end of input)
const str = "https://www.google.com/this/is/a/long/url/and/we/are/going/to/try/to/find/the/end-of-it" str.startsWith("end-of-it")