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:
4 months ago
textencoder api
2.8M/s
str2ab
1.3M/s
View exact numbers
Test name
Executions per second
✓
textencoder api
2,783,721 Ops/sec
str2ab
1,336,300 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) }