Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.1 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
typeof x === "undefined" 28805922.0 Ops/sec
x === undefined 10539086.0 Ops/sec
x == undefined 10468040.0 Ops/sec
x == null 29097300.0 Ops/sec
!x 29059010.0 Ops/sec
Script Preparation code:
Tests:
  • typeof x === "undefined"

  • x === undefined

  • x == undefined

  • x == null

  • !x