Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133
Windows
Desktop
16 days ago
Test name Executions per second
Array.from + join + fromCodePoint 48.5 Ops/sec
Array.from + join + fromCharCode 50.2 Ops/sec
Array.reduce + fromCodePoint 57.5 Ops/sec
Array.reduce + fromCharCode 56.7 Ops/sec
String concatenation + fromCodePoint 57.3 Ops/sec
String concatenation + fromCharCode 55.3 Ops/sec
Function.apply + Array.reduce+ fromCodePoint (chunked) 462.6 Ops/sec
Function.apply + Array.reduce + fromCharCode (chunked) 1059.7 Ops/sec
Function.apply + String concatenation + fromCodePoint (chunked) 446.4 Ops/sec
Function.apply + String concatenation + fromCharCode (chunked) 1019.8 Ops/sec
Function.apply + Array.reduce+ fromCodePoint (small chunks) 304.0 Ops/sec
Function.apply + Array.reduce + fromCharCode (small chunks) 542.7 Ops/sec
Function.apply + String concatenation + fromCodePoint (small chunks) 278.6 Ops/sec
Function.apply + String concatenation + fromCharCode (small chunks) 517.4 Ops/sec
utf-16 TextDecoder 1725.9 Ops/sec
Script Preparation code:
Tests:
  • Array.from + join + fromCodePoint

  • Array.from + join + fromCharCode

  • Array.reduce + fromCodePoint

  • Array.reduce + fromCharCode

  • String concatenation + fromCodePoint

  • String concatenation + fromCharCode

  • Function.apply + Array.reduce+ fromCodePoint (chunked)

  • Function.apply + Array.reduce + fromCharCode (chunked)

  • Function.apply + String concatenation + fromCodePoint (chunked)

  • Function.apply + String concatenation + fromCharCode (chunked)

  • Function.apply + Array.reduce+ fromCodePoint (small chunks)

  • Function.apply + Array.reduce + fromCharCode (small chunks)

  • Function.apply + String concatenation + fromCodePoint (small chunks)

  • Function.apply + String concatenation + fromCharCode (small chunks)

  • utf-16 TextDecoder