Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 QQ/8.6.5.638 V1_IPH_SQ_8.6.5_1_APP_A Pixel/828 MiniAppEnable SimpleUISwitch/1 StudyMode/0 QQTheme/2921 Core/WKWebView Device/Apple(iPhone 11) NetType/WIFI QBWebViewType/1 WKType/1
Mobile Safari 14
iOS 14.4.2
Mobile
3 years ago
Test name Executions per second
Object.entries 10.5 Ops/sec
for..in 9.6 Ops/sec
Object.keys 10.1 Ops/sec
Object.keys no entry 11.5 Ops/sec
for..in no array 10.8 Ops/sec
Object.entries no array 11.4 Ops/sec
Script Preparation code:
Tests:
  • Object.entries

  • for..in

  • Object.keys

  • Object.keys no entry

  • for..in no array

  • Object.entries no array