Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36
Chrome 101
Linux
Desktop
2 years ago
Test name Executions per second
value == null 21371828.0 Ops/sec
value == undefined 7116644.5 Ops/sec
value === null 21432204.0 Ops/sec
value === undefined 7165268.0 Ops/sec
value === null || value === undefined 5359920.5 Ops/sec
_.isNil(value) 6943191.5 Ops/sec
value != null 21427110.0 Ops/sec
value != undefined 6651236.5 Ops/sec
value !== null 20097118.0 Ops/sec
value !== undefined 6693450.0 Ops/sec
value !== null && value !== undefined 4991070.5 Ops/sec
!_.isNil(value) 6548229.0 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)


;