Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Windows
Desktop
3 months ago
Test name Executions per second
RESOURCE_TYPES + ...res 2535.3 Ops/sec
RESOURCE_TYPES + res[type] 127490.3 Ops/sec
RESOURCE_TYPES.map 177083.9 Ops/sec
RESOURCE_TYPES.forEach 252779.1 Ops/sec
RESOURCE_TYPES for of 94039.4 Ops/sec
RESOURCE_TYPES for let i 288608.3 Ops/sec
RESOURCE_TYPES + Map 31617.3 Ops/sec
Script Preparation code:
Tests:
  • RESOURCE_TYPES + ...res

  • RESOURCE_TYPES + res[type]

  • RESOURCE_TYPES.map

  • RESOURCE_TYPES.forEach

  • RESOURCE_TYPES for of

  • RESOURCE_TYPES for let i

  • RESOURCE_TYPES + Map