Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
text encoders
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 138
Operating system:
Android
Device Platform:
Mobile
Date tested:
9 months ago
Test name
Executions per second
str2ab
1297914.0 Ops/sec
textencoder api
430796.9 Ops/sec
Tests:
str2ab
str2ab('Hello world!'); function str2ab(str) { var buf = new ArrayBuffer(str.length*2); var bufView = new Uint16Array(buf); for (var i=0, strLen=str.length; i < strLen; i++) { bufView[i] = str.charCodeAt(i); } return buf; }
textencoder api
str2ab('Hello world!'); function str2ab(str) { return new TextEncoder('utf-8').encode(str) }