Script Preparation code:
Tests:
  • for..in + sort()

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

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

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

  • Object.values() + sort()

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    for..in + sort()
    for..in + Object.values() + sort()
    Object.values() + sort() + for
    Object.values() + sort() + reduce
    Object.values() + sort()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 10 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120 on Windows
View result in a separate tab
Test name Executions per second
for..in + sort() 35812.7 Ops/sec
for..in + Object.values() + sort() 39334.1 Ops/sec
Object.values() + sort() + for 82656.9 Ops/sec
Object.values() + sort() + reduce 84800.7 Ops/sec
Object.values() + sort() 68447.1 Ops/sec


;