Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
String.fromCharCode
2.7M/s
TextDecoder
1.1M/s

Fastest: String.fromCharCode (2.6x faster)

View exact numbers
  • String.fromCharCode: 2,745,441 ops/sec
  • TextDecoder: 1,057,308 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
    TextDecoder
    String.fromCharCode

    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; rv:134.0) Gecko/20100101 Firefox/134.0
Firefox 134 on Windows
View result in a separate tab
String.fromCharCode
1.9M/s
TextDecoder
1.6M/s
View exact numbers
Test name Executions per second
String.fromCharCode 1,946,741 Ops/sec
TextDecoder 1,593,655 Ops/sec