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 1403659.0 Ops/sec
for .. in loop 586.7 Ops/sec
for .. of loop 1019042.9 Ops/sec
classical loop 599.9 Ops/sec
classical loop 2 52170.3 Ops/sec
for .. in loop 2 42997.4 Ops/sec
split+forEach 61202.5 Ops/sec
for .. in loop 3 44302.6 Ops/sec
for .. of loop 2 75156.9 Ops/sec
from 265537.9 Ops/sec
from + split 269808.0 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


;