Script Preparation code:
AخA
 
var array = ["one","two"];
Tests:
  • exists

     
    function test(tmp){
      if(tmp)
      {
        return 1;
      }
    }
    console.log(test(array));
  • length

     
    function test(tmp){
      if(tmp.length)
      {
        return 1;
      }
    }
    console.log(test(array));
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    exists
    length

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2025 years ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36
Chrome 59 on Linux
View result in a separate tab
Test name Executions per second
exists 50226.9 Ops/sec
length 53739.6 Ops/sec