Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Firefox 121
Linux
Desktop
10 months ago
Test name Executions per second
for..in + sort() 550094.8 Ops/sec
for..in + Object.values() + sort() 558362.8 Ops/sec
Object.values() + sort() + for 692039.6 Ops/sec
Object.values() + sort() + reduce 734377.9 Ops/sec
Object.values() + sort() 514725.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()


;