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 (Android 15; Mobile; rv:148.0) Gecko/148.0 Firefox/148.0
Browser:
Firefox Mobile 148
Operating system:
Android
Device Platform:
Mobile
Date tested:
one month ago
Test name
Executions per second
str2ab
1336300.1 Ops/sec
textencoder api
2783721.0 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) }