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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Safari/605.1.15
Browser:
Safari 17
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
charCodeAt(0)
475068224.0 Ops/sec
charCodeAt(300)
465713792.0 Ops/sec
[0]
515426592.0 Ops/sec
[10]
470856256.0 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]