Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
parseInt vs charCodeAt
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/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
parseInt
86795.0 Ops/sec
charCodeAt
3528088.5 Ops/sec
Script Preparation code:
var strings = [ "6", "4", "3", "4", "1", "1", "5", "4", "1", "3", "2", "2", "5", "7", "1", "2", "1", "0", "5", "7", "4", "5", "0", "5", "1", "0", "4", "1", "7", "7", "0", "4", "0", "6", "3", "7", "7", "7", "5", "0", "0", "5", "0", "3", "3", "0", "5", "0", "2", "6", "2", "3", "3", "6", "2", "3", "0", "5", "5", "5", "6", "2", "3", "4", "4", "0", "7", "2", "3", "2", "6", "1", "4", "1", "1", "6", "5", "7", "4", "2", "5", "4", "6", "3", "4", "5", "4", "6", "1", "0", "3", "4", "7", "1", "0", "5", "4", "5", "3", "6" ];
Tests:
parseInt
for (let s of strings) { let a = parseInt(s[0]); }
charCodeAt
for (let s of strings) { let a = s.charCodeAt(0) - 48; }