Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
String.fromCharCode.apply
3.7M/s
For-loop
69K/s

Fastest: String.fromCharCode.apply (53.3x faster)

View exact numbers
  • String.fromCharCode.apply: 3,674,182 ops/sec
  • For-loop: 68,949 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
    For-loop
    String.fromCharCode.apply

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
String.fromCharCode.apply
3.6M/s
For-loop
1.6M/s
View exact numbers
Test name Executions per second
String.fromCharCode.apply 3,581,296 Ops/sec
For-loop 1,583,063 Ops/sec