Run details:
Mozilla/5.0 (Linux; Android 12; SM-N975F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36
Chrome Mobile 105
Android
Mobile
2 years ago
Test name Executions per second
Map - for of kv 2898966.0 Ops/sec
Map - forEach 1939484.4 Ops/sec
Object.entries() - for of kv 444657.3 Ops/sec
Object.entries() - forEach 100003.6 Ops/sec
Object - for in 293725.7 Ops/sec
Object - keys forech 56539.6 Ops/sec
Script Preparation code:
Tests:
  • Map - for of kv

  • Map - forEach

  • Object.entries() - for of kv

  • Object.entries() - forEach

  • Object - for in

  • Object - keys forech