Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36
Chrome 100
Linux
Desktop
2 years ago
Test name Executions per second
native for-of w/ entries 1880.2 Ops/sec
native forEach w/ entries 1641.1 Ops/sec
vanilla for-loop w/ Object.keys 1041.0 Ops/sec
vanilla for-loop w/ Object.entries 1990.3 Ops/sec
vanilla for-loop w/ Object.values (no keys) 24947.7 Ops/sec
native forEach w/ Object.values (no keys) 17622.5 Ops/sec
native for-in 500.4 Ops/sec
Script Preparation code:
Tests:
  • native for-of w/ entries

  • native forEach w/ entries

  • vanilla for-loop w/ Object.keys

  • vanilla for-loop w/ Object.entries

  • vanilla for-loop w/ Object.values (no keys)

  • native forEach w/ Object.values (no keys)

  • native for-in


;