Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.75 Safari/537.36
Chrome 68
Windows 7
Desktop
2 years ago
Test name Executions per second
!var1 7542149.0 Ops/sec
var1===undefined 2232130.8 Ops/sec
var1 || var1==="" || var1===0 2511181.0 Ops/sec
!(1 in arguments) 57510236.0 Ops/sec
!arguments[1] 589067136.0 Ops/sec
!object["var"] 7527132.0 Ops/sec
!object[0] 7453285.5 Ops/sec
!arguments["string"] 573014272.0 Ops/sec
Script Preparation code:
Tests:
  • !var1

  • var1===undefined

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

  • !(1 in arguments)

  • !arguments[1]

  • !object["var"]

  • !object[0]

  • !arguments["string"]


;