Script Preparation code:
Tests:

Historical Performance Data aggregated from 15 community runs

Desktop Results:
Firefox 9 runs
byteArrayToString
4K/s
String.fromCharCode.apply
3K/s
arr join
1K/s
String.fromCharCode
1K/s
bytesToBase64
378/s

Fastest: byteArrayToString (10.1x faster)

View exact numbers
  • byteArrayToString: 3,836 ops/sec
  • String.fromCharCode.apply: 2,830 ops/sec
  • arr join: 1,354 ops/sec
  • String.fromCharCode: 1,004 ops/sec
  • bytesToBase64: 378 ops/sec
Chrome 6 runs
byteArrayToString
3K/s
String.fromCharCode.apply
2K/s
bytesToBase64
2K/s
String.fromCharCode
1K/s
arr join
428/s

Fastest: byteArrayToString (7.4x faster)

View exact numbers
  • byteArrayToString: 3,180 ops/sec
  • String.fromCharCode.apply: 2,350 ops/sec
  • bytesToBase64: 1,625 ops/sec
  • String.fromCharCode: 1,147 ops/sec
  • arr join: 428 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    String.fromCharCode.apply
    String.fromCharCode
    bytesToBase64
    arr join
    byteArrayToString

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Chrome 136 on Windows
View result in a separate tab
byteArrayToString
4K/s
String.fromCharCode.apply
3K/s
bytesToBase64
2K/s
String.fromCharCode
2K/s
arr join
595/s
View exact numbers
Test name Executions per second
byteArrayToString 3,723 Ops/sec
String.fromCharCode.apply 3,376 Ops/sec
bytesToBase64 2,380 Ops/sec
String.fromCharCode 1,787 Ops/sec
arr join 595 Ops/sec