Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
includes VS charat
(version: 1)
Comparing performance of:
includes vs charAt
Created:
one month ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ const id = '123818727033' const id_bot = '123818727033B' const id_local = '123818727033_2'
Tests:
includes
/*When writing async/deferred tests, use `deferred.resolve()` to mark test as done*/ id.includes('_') id_bot.includes('_') id_local.includes('_')
charAt
id.charAt(12) === '_' id_bot.charAt(12) === '_' id_local.charAt(12) === '_'
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
includes
charAt
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one month ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Browser/OS:
Chrome 149 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
charAt
233.0M/s
includes
231.1M/s
View exact numbers
Test name
Executions per second
✓
charAt
233,012,400 Ops/sec
includes
231,145,136 Ops/sec
Related benchmarks
js mul vs pow
JS Split VS RegExp
includes vs. word starts with
User Agent search
test vs exec
=== vs reges
Array flat
string cast vs template literal cast vs cached empty string cast
string cast vs template literal cast vs cached empty string cast with random values
Comments
Confirm delete:
Do you really want to delete benchmark?