Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2716.0 Safari/537.36
Chrome 52
Windows 7
Desktop
2 years ago
Test name Executions per second
!var1 6500778.5 Ops/sec
var1===undefined 2218868.0 Ops/sec
var1 || var1==="" || var1===0 2428181.8 Ops/sec
!(1 in arguments) 8231357.0 Ops/sec
!arguments[1] 26714556.0 Ops/sec
!object["var"] 7063304.0 Ops/sec
!object[0] 6736575.0 Ops/sec
!arguments["string"] 42434208.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"]


;