Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome 87
Linux
Desktop
3 years ago
Test name Executions per second
value == null 9972058.0 Ops/sec
value == undefined 3440856.0 Ops/sec
value === null 9898791.0 Ops/sec
value === undefined 3389206.8 Ops/sec
value === null || value === undefined 2276593.2 Ops/sec
_.isNil(value) 3183879.2 Ops/sec
value != null 9581172.0 Ops/sec
value != undefined 3265596.2 Ops/sec
value !== null 9630390.0 Ops/sec
value !== undefined 3207475.0 Ops/sec
value !== null && value !== undefined 2390716.8 Ops/sec
!_.isNil(value) 3221565.2 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)