Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15
Safari 15
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Array.from, reverse, join 244.3 Ops/sec
Iterate, concat 96.1 Ops/sec
Iterate, push, join 91.4 Ops/sec
iterate concat to first (charAt) 94.7 Ops/sec
iterate concat to first 95.0 Ops/sec
split, iterate, concat to first 364.3 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