Script Preparation code:
x
 
function makeid() {
  var text = "";
  var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  for (var i = 0; i < 5; i++)
    text += possible.charAt(Math.floor(Math.random() * possible.length));
  return text;
}
window.parentObj = {};
for (let i = 0; i < 100; i++) {
    window.parentObj[makeid()] = makeid();
}
Tests:
  • Object.values

     
    const testArray = [];
    Object.values(window.parentObj).forEach(v => {
        testArray.push(v);    
    });
  • Object.keys.map

     
    const testArray = [];
    Object.keys(window.parentObj).map(k => {
        testArray.push(window.parentObj[k]);    
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Object.values
    Object.keys.map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Mobile; LYF/F120B/LYF-F120B-001-02-34-170919-i;Android; rv:48.0) Gecko/48.0 Firefox/48.0 KAIOS/2.5
Firefox Mobile 48 on Firefox OS
View result in a separate tab
Test name Executions per second
Object.values 12037.2 Ops/sec
Object.keys.map 2822.6 Ops/sec