Run details:
Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0
Firefox 52
Windows XP
Desktop
4 months ago
Test name Executions per second
For-loop 197931.9 Ops/sec
String.fromCharCode.apply 539508.3 Ops/sec
loop: String cached 237576.6 Ops/sec
loop: String.fromCharCode cached 242205.9 Ops/sec
join: String.fromCharCode cached 214051.4 Ops/sec
Script Preparation code:
Tests:
  • For-loop

  • String.fromCharCode.apply

  • loop: String cached

  • loop: String.fromCharCode cached

  • join: String.fromCharCode cached