Script Preparation code:
x
 
var obj = {};
for (let i = 0; i < 1000; i++) {
  obj['abc_' + i] = i;
}
Tests:
  • Object.keys

     
    Object.keys(obj);
  • Object.values

     
    Object.values(obj);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object.keys
    Object.values

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78 on Linux
View result in a separate tab
Test name Executions per second
Object.keys 79368.5 Ops/sec
Object.values 59075.7 Ops/sec