Script Preparation code:
x
 
var obj = { a: 1, b: 2, c: 3, d: 4, e: 5 };
obj.check = function(name) { return !!this[name]; };
Tests:
  • hasOwnProperty

     
    obj.hasOwnProperty( 'd' );
  • bool with Array

     
    !! obj['d'];
  • bool

     
    !! obj.d;
  • With methode

     
    obj.check('d');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    hasOwnProperty
    bool with Array
    bool
    With methode

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Firefox 56 on Windows
View result in a separate tab
Test name Executions per second
hasOwnProperty 208678720.0 Ops/sec
bool with Array 517099552.0 Ops/sec
bool 517026496.0 Ops/sec
With methode 242204192.0 Ops/sec