Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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:
10 months ago
Benchmark engine:
Benchmark.js
lastIndexOf
58.7M/s
startsWith
51.2M/s
includes
31.1M/s
View exact numbers
Test name
Executions per second
✓
lastIndexOf
58,652,764 Ops/sec
startsWith
51,211,040 Ops/sec
includes
31,146,834 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)