Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
startswith vs includes vs lastindexof
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.7 Mobile/15E148 Safari/604.1
Browser:
Mobile Safari 18
Operating system:
iOS 18.7.1
Device Platform:
Mobile
Date tested:
6 months ago
Test name
Executions per second
includes
31146834.0 Ops/sec
startsWith
51211040.0 Ops/sec
lastIndexOf
58652764.0 Ops/sec
Tests:
includes
const str = "https://firebase.com/this/is/a/long/thing" str.includes("firebase")
startsWith
const str = "https://firebase.com/this/is/a/long/thing" str.startsWith("https://firebase")
lastIndexOf
const str = "https://firebase.com/this/is/a/long/thing" str.lastIndexOf("https://firebase", 0)