Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116
Windows
Desktop
one year ago
Test name Executions per second
value == null 6214591.0 Ops/sec
value == undefined 2180080.0 Ops/sec
value === null 6334056.0 Ops/sec
value === undefined 2232059.8 Ops/sec
value === null || value === undefined 1668596.4 Ops/sec
_.isNil(value) 1590591.9 Ops/sec
value != null 6212379.0 Ops/sec
value != undefined 2252116.8 Ops/sec
value !== null 6668767.5 Ops/sec
value !== undefined 2183239.5 Ops/sec
value !== null && value !== undefined 1618652.9 Ops/sec
!_.isNil(value) 2078422.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • value == null

  • value == undefined

  • value === null

  • value === undefined

  • value === null || value === undefined

  • _.isNil(value)

  • value != null

  • value != undefined

  • value !== null

  • value !== undefined

  • value !== null && value !== undefined

  • !_.isNil(value)


;