parseInt vs charCodeAtFastest: charCodeAt (41.7x faster)
5,265,359 ops/sec
126,323 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| parseInt | |
| charCodeAt |
| Test name | Executions per second |
|---|---|
| ✓ charCodeAt | 1,496,112 Ops/sec |
| parseInt | 1,133,227 Ops/sec |