Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
10 months ago
Test name Executions per second
for..in + sort() 105179.1 Ops/sec
for..in + Object.values() + sort() 102607.8 Ops/sec
Object.values() + sort() + for 207013.6 Ops/sec
Object.values() + sort() + reduce 215334.3 Ops/sec
Object.values() + sort() 181332.7 Ops/sec
Script Preparation code:
Tests:
  • for..in + sort()

  • for..in + Object.values() + sort()

  • Object.values() + sort() + for

  • Object.values() + sort() + reduce

  • Object.values() + sort()


;