Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Chrome 95
Windows
Desktop
3 years ago
Test name Executions per second
For ... in length test 11341971.0 Ops/sec
Object.keys length test 4168616.2 Ops/sec
Object.values length test 3745656.2 Ops/sec
Object.entries length test 3473426.8 Ops/sec
For In Reduce test 1514158.5 Ops/sec
Object.keys Reduce test 1201873.1 Ops/sec
Object.values Reduce test 3564749.8 Ops/sec
Object.entries reduce test 3369183.0 Ops/sec
Script Preparation code:
Tests:
  • For ... in length test

  • Object.keys length test

  • Object.values length test

  • Object.entries length test

  • For In Reduce test

  • Object.keys Reduce test

  • Object.values Reduce test

  • Object.entries reduce test