Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox 91
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
Map - for of kv 708481.8 Ops/sec
Map - forEach 2875248.2 Ops/sec
Object.entries() - for of kv 473074.2 Ops/sec
Object.entries() - forEach 103213.6 Ops/sec
Object - for in 1428866.5 Ops/sec
Script Preparation code:
Tests:
  • Map - for of kv

  • Map - forEach

  • Object.entries() - for of kv

  • Object.entries() - forEach

  • Object - for in