Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0
Firefox 94
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
value == null 571148864.0 Ops/sec
value == undefined 541193600.0 Ops/sec
value === null 542468352.0 Ops/sec
value === undefined 519401024.0 Ops/sec
value === null || value === undefined 563400832.0 Ops/sec
_.isNil(value) 567651584.0 Ops/sec
value != null 493532608.0 Ops/sec
value != undefined 586128064.0 Ops/sec
value !== null 639202816.0 Ops/sec
value !== undefined 552737152.0 Ops/sec
value !== null && value !== undefined 504331872.0 Ops/sec
!_.isNil(value) 537578816.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)