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
Go 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:
one year 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
String.fromCharCode
1287.6M/s
charAt
1041.0M/s
View exact numbers
Test name
Executions per second
✓
String.fromCharCode
1,287,602,176 Ops/sec
charAt
1,040,986,432 Ops/sec
Related benchmarks
charAt vs charCodeAt
string.charCodeAt(index) vs string[index].charCodeAt()
string.charCodeAt(index) vs string[index].charCodeAt() vs +string[index]
String.charAt vs String.sub
Comments
Confirm delete:
Do you really want to delete benchmark?