Script Preparation code:
Tests:
  • !var1

  • var1===undefined

  • var1 || var1==="" || var1===0

  • !(1 in arguments)

  • !arguments[1]

  • !object["var"]

  • !object[0]

  • !arguments["string"]

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    !var1
    var1===undefined
    var1 || var1==="" || var1===0
    !(1 in arguments)
    !arguments[1]
    !object["var"]
    !object[0]
    !arguments["string"]

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Chrome 92 on Windows 7
View result in a separate tab
Test name Executions per second
!var1 8161506.0 Ops/sec
var1===undefined 3139365.0 Ops/sec
var1 || var1==="" || var1===0 2638536.0 Ops/sec
!(1 in arguments) 725452300.0 Ops/sec
!arguments[1] 734250200.0 Ops/sec
!object["var"] 8490036.0 Ops/sec
!object[0] 8337537.0 Ops/sec
!arguments["string"] 669589600.0 Ops/sec