Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0
Firefox 126
Mac OS X 10.15
Desktop
7 months ago
Test name Executions per second
split + map + instance 744168.8 Ops/sec
for .. in loop 1628.8 Ops/sec
for .. of loop 649517.4 Ops/sec
classical loop 1593.8 Ops/sec
classical loop 2 244678.7 Ops/sec
for .. in loop 2 74819.5 Ops/sec
split+forEach 215304.3 Ops/sec
for .. in loop 3 75560.1 Ops/sec
for .. of loop 2 198969.7 Ops/sec
split + map 2 684353.1 Ops/sec
Script Preparation code:
Tests:
  • split + map + instance

  • for .. in 1

  • for .. in 2

  • classical loop

  • classical loop 2

  • for .. in loop 2

  • split+forEach

  • for .. in loop 3

  • for .. of loop 2

  • from

  • from + split

  • TextEncoder