Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
charcodeat vs. codepointat
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/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
charcodeat
29.7M/s
codepointat
29.7M/s
charcodeat tostring
27.5M/s
codepointat tostring
27.4M/s
View exact numbers
Test name
Executions per second
✓
charcodeat
29,742,256 Ops/sec
codepointat
29,684,546 Ops/sec
charcodeat tostring
27,505,678 Ops/sec
codepointat tostring
27,423,238 Ops/sec
Script Preparation code:
var str = "\x02idjghjhdfjfdjfdjhgkghkghk dhfdg dhdf dfhdfh"
Tests:
codepointat tostring
str.codePointAt(0).toString()
charcodeat tostring
str.charCodeAt(0).toString()
codepointat
str.codePointAt(0)
charcodeat
str.charCodeAt(0)