Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
javascript startsWith() vs includes() multiple tests
(version: 1)
Comparing performance of:
startsWith match at start vs startsWith no match vs includes match at start vs includes match at middle vs includes match at end vs includes no match
Created:
6 months ago
by:
Guest
Jump to the latest result
Tests:
startsWith match at start
const str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." str.startsWith("Lorem Ipsum")
startsWith no match
const str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." str.startsWith("Lorem Ipsum")
includes match at start
const str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." str.includes("Lorem Ipsum")
includes match at middle
const str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." str.includes("text of")
includes match at end
const str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." str.includes("industry.")
includes no match
const str = "Lorem Ipsum is simply dummy text of the printing and typesetting industry." str.includes("brown dog")
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (6)
Previous results
Fork
Test case name
Result
startsWith match at start
startsWith no match
includes match at start
includes match at middle
includes match at end
includes no match
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?