Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Firefox 96
Linux
Desktop
2 years ago
Test name Executions per second
Map - for of kv 1011945.7 Ops/sec
Map - forEach 3879081.2 Ops/sec
Object.entries() - for of kv 657380.9 Ops/sec
Object.entries() - forEach 127361.2 Ops/sec
Object - for in 2580906.5 Ops/sec
Script Preparation code:
Tests:
  • Map - for of kv

  • Map - forEach

  • Object.entries() - for of kv

  • Object.entries() - forEach

  • Object - for in