Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Chrome 92
Windows 7
Desktop
2 years ago
Test name Executions per second
!var1 8161505.5 Ops/sec
var1===undefined 3139364.5 Ops/sec
var1 || var1==="" || var1===0 2638535.8 Ops/sec
!(1 in arguments) 725452288.0 Ops/sec
!arguments[1] 734250240.0 Ops/sec
!object["var"] 8490036.0 Ops/sec
!object[0] 8337537.0 Ops/sec
!arguments["string"] 669589568.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"]


;