Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0
Chrome 126
Mac OS X 10.15.7
Desktop
7 months ago
Test name Executions per second
split + map + instance 1422990.2 Ops/sec
for .. in loop 588.5 Ops/sec
for .. of loop 1008455.2 Ops/sec
classical loop 595.1 Ops/sec
classical loop 2 52855.2 Ops/sec
for .. in loop 2 42900.7 Ops/sec
split+forEach 59785.1 Ops/sec
for .. in loop 3 42890.7 Ops/sec
for .. of loop 2 73443.1 Ops/sec
split + map 2 1416732.8 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