Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Firefox 59
Windows 7
Desktop
2 years ago
Test name Executions per second
!var1 293302304.0 Ops/sec
var1===undefined 130526072.0 Ops/sec
var1 || var1==="" || var1===0 125624016.0 Ops/sec
!(1 in arguments) 8057576.0 Ops/sec
!arguments[1] 6330335.0 Ops/sec
!object["var"] 239857472.0 Ops/sec
!object[0] 173688928.0 Ops/sec
!arguments["string"] 17911224.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"]


;