Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
charCodeAt vs []
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 OPR/94.0.0.0
Browser:
Opera 94
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
charCodeAt(300)
461.9M/s
charCodeAt(0)
460.4M/s
[0]
460.3M/s
[10]
460.3M/s
View exact numbers
Test name
Executions per second
✓
charCodeAt(300)
461,922,496 Ops/sec
charCodeAt(0)
460,437,696 Ops/sec
[0]
460,314,240 Ops/sec
[10]
460,256,736 Ops/sec
Script Preparation code:
var str = "some string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string heresome string here"
Tests:
charCodeAt(0)
str.charCodeAt(0)
charCodeAt(300)
str.charCodeAt(300)
[0]
str[0]
[10]
str[300]