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
6 months ago
Test name Executions per second
split + map + instance 1407043.9 Ops/sec
for .. in loop 119398.1 Ops/sec
for .. of loop 1175263.4 Ops/sec
classical loop 164387.2 Ops/sec
classical loop 2 175423.5 Ops/sec
for .. in loop 2 96850.0 Ops/sec
split+forEach 269661.3 Ops/sec
for .. in loop 3 97038.8 Ops/sec
for .. of loop 2 1728866.6 Ops/sec
split + map 2 1412963.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


;