Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
== null 1649292.1 Ops/sec
=== null || === undefined 582183.1 Ops/sec
== null (via util func) 949545.0 Ops/sec
=== null || === undefined (via util func) 563454.2 Ops/sec
=== null || === undefined || === "" 489681.3 Ops/sec
=== null || === undefined || === "" (via utility func) 564379.1 Ops/sec
== null with complex object or array only 2256045.2 Ops/sec
== null with complex object or array only (via utility func) 564580.2 Ops/sec
Script Preparation code:
Tests:
  • == null

  • === null || === undefined

  • == null (via util func)

  • === null || === undefined (via util func)

  • === null || === undefined || === ""

  • === null || === undefined || === "" (via utility func)

  • == null with complex object or array only

  • == null with complex object or array only (via utility func)


;