Script Preparation code:
AخA
 
var anObject = {
    child: {
        grandchild: "hello"
    }
}
Tests:
  • If

    x
     
    var result = null;
    if(anObject){
      if(anObject["child"]) {
        if(anObject["child"]["grandchild"]){
          result = anObject["child"]["grandchild"];
        }
      }
    }
  • Try Catch

     
    var result = null;
    try {
        result = anObject["child"]["grandchild"];
    }
    catch(err) {}
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    If
    Try Catch

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0
Firefox 64 on Windows 8.1
View result in a separate tab
Test name Executions per second
If 24006232.0 Ops/sec
Try Catch 36738580.0 Ops/sec