Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0
Firefox 125
Mac OS X 10.15
Desktop
2 years ago
Benchmark.js
byteArrayToString
4K/s
String.fromCharCode.apply
4K/s
arr join
2K/s
String.fromCharCode
1K/s
bytesToBase64
688/s
View exact numbers
Test name Executions per second
byteArrayToString 3,858 Ops/sec
String.fromCharCode.apply 3,767 Ops/sec
arr join 1,741 Ops/sec
String.fromCharCode 1,307 Ops/sec
bytesToBase64 688 Ops/sec
Script Preparation code:
Tests: