Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36
Chrome 101
Windows
Desktop
2 years ago
Test name Executions per second
Object.keys - get all values 28.1 Ops/sec
Object.values - get all values 1806.2 Ops/sec
Object.entries - get all values 41.8 Ops/sec
Object.keys - get first 142.7 Ops/sec
Object.values - get first value 1859.3 Ops/sec
Object.entries - get first value 46.3 Ops/sec
Script Preparation code:
Tests:
  • Object.keys - get all values

  • Object.values - get all values

  • Object.entries - get all values

  • Object.keys - get first

  • Object.values - get first value

  • Object.entries - get first value


;