Tests:
  • stringify

    AخA
     
    var test = {};
    if(JSON.stringify(test) === '{}') {
      return true;
    }
  • object.keys

     
    var test = {};
    if(!Object.keys(test).length) {
      return true;
    }
  • object.values

     
    var test = {};
    if(!Object.values(test).length) {
      return true;
    }
  • getOwnPropertyNames

    x
     
    var test = {};
    if (Object.getOwnPropertyNames(test).length === 0){
      return true;
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    stringify
    object.keys
    object.values
    getOwnPropertyNames

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2025 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
Chrome 64 on Mac OS X 10.12.6
View result in a separate tab
Test name Executions per second
stringify 2042367.1 Ops/sec
object.keys 5533401.5 Ops/sec
object.values 4009676.2 Ops/sec
getOwnPropertyNames 3644440.2 Ops/sec