Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:135.0) Gecko/20100101 Firefox/135.0
Firefox 135
Mac OS X 10.15
Desktop
one year ago
Benchmark.js
byteArrayToString
5K/s
String.fromCharCode.apply
5K/s
arr join
2K/s
String.fromCharCode
1K/s
bytesToBase64
378/s
View exact numbers
Test name Executions per second
byteArrayToString 5,320 Ops/sec
String.fromCharCode.apply 4,517 Ops/sec
arr join 1,845 Ops/sec
String.fromCharCode 1,493 Ops/sec
bytesToBase64 378 Ops/sec
Script Preparation code:
Tests: