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 35.0 Ops/sec
Iterate, concat 90.7 Ops/sec
Iterate, push, join 90.8 Ops/sec
iterate concat to first (charAt) 90.9 Ops/sec
iterate concat to first 90.4 Ops/sec
split, iterate, concat to first 333.1 Ops/sec
split, reverse, join 383.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