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() 99049.9 Ops/sec
for..in + Object.values() + sort() 100496.1 Ops/sec
Object.values() + sort() + for 214783.5 Ops/sec
Object.values() + sort() + reduce 211354.9 Ops/sec
Object.values() + sort() 187142.0 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()


;