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 734726.3 Ops/sec
for .. in loop 135858.8 Ops/sec
for .. of loop 657840.6 Ops/sec
classical loop 2801409.5 Ops/sec
classical loop 2 10148120.0 Ops/sec
for .. in loop 2 108332.2 Ops/sec
split+forEach 1470023.9 Ops/sec
for .. in loop 3 108803.0 Ops/sec
for .. of loop 2 850255.4 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