Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
startsWith vs includes vs search
(version: 0)
Comparing performance of:
startsWith vs includes vs search
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
startsWith
var a = "/articles/this-that-other-outre-collection" var b = a.startsWith('/articles');
includes
var a = "/articles/this-that-other-outre-collection" var b = a.includes('articles',1);
search
var a = "/articles/this-that-other-outre-collection" var b = a.search('articles');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
startsWith
includes
search
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Browser/OS:
Chrome 129 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
includes
231.2M/s
startsWith
105.2M/s
search
12.9M/s
View exact numbers
Test name
Executions per second
✓
includes
231,175,744 Ops/sec
startsWith
105,151,208 Ops/sec
search
12,912,043 Ops/sec
Comments
Confirm delete:
Do you really want to delete benchmark?