Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Mac OS X 10.15.7
Desktop
9 months ago
Test name Executions per second
Array.from, reverse, join 255.3 Ops/sec
Iterate, concat 107.2 Ops/sec
Iterate, push, join 83.2 Ops/sec
iterate concat to first (charAt) 105.6 Ops/sec
iterate concat to first 106.6 Ops/sec
split, iterate, concat to first 422.5 Ops/sec
split, reverse, join 319.7 Ops/sec
Script Preparation code:
Tests:
  • Array.from, reverse, join

  • Iterate, concat

  • Iterate, push, join

  • iterate concat to first (charAt)

  • iterate concat to first

  • split, iterate, concat to first

  • split, reverse, join