Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
charAt vs String.fromCharCode
(version: 1)
Comparing performance of:
charAt vs String.fromCharCode
Created:
one year ago
by:
Registered User
Jump to the latest result
Script Preparation code:
const string = 'abahdbashjdbs' const charCode = string.charCodeAt(5) const index = 5
Tests:
charAt
string.charAt(index)
String.fromCharCode
String.fromCharCode(charCode)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
charAt
String.fromCharCode
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
9 months ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser/OS:
Firefox 140 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
charAt
1040986432.0 Ops/sec
String.fromCharCode
1287602176.0 Ops/sec
Related benchmarks:
lodashddddd
charAt vs charCodeAt
char index vs charAt() for the first character
charCodeAt vs codePointAt short string
string.charCodeAt(index) vs string[index].charCodeAt()
Check first character 2
string.charCodeAt(index) vs string[index].charCodeAt() vs +string[index]
String.charAt vs String.sub
String vs ''
Comments
Confirm delete:
Do you really want to delete benchmark?