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() 98833.3 Ops/sec
for..in + Object.values() + sort() 99905.9 Ops/sec
Object.values() + sort() + for 211528.6 Ops/sec
Object.values() + sort() + reduce 206167.7 Ops/sec
Object.values() + sort() 180527.2 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()


;