Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Chrome 99
Linux
Desktop
2 years ago
Test name Executions per second
value == null 2061053.5 Ops/sec
value == undefined 646913.6 Ops/sec
value === null 2009408.0 Ops/sec
value === undefined 829561.8 Ops/sec
value === null || value === undefined 1858651.9 Ops/sec
_.isNil(value) 2370788.8 Ops/sec
value != null 7367978.0 Ops/sec
value != undefined 1686863.0 Ops/sec
value !== null 2222053.5 Ops/sec
value !== undefined 605239.9 Ops/sec
value !== null && value !== undefined 484014.0 Ops/sec
!_.isNil(value) 602892.8 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)