Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0
Firefox 94
Ubuntu
Desktop
3 years ago
Test name Executions per second
value == null 1666588800.0 Ops/sec
value == undefined 1736351104.0 Ops/sec
value === null 1680434432.0 Ops/sec
value === undefined 1720667008.0 Ops/sec
value === null || value === undefined 1474374272.0 Ops/sec
_.isNil(value) 1471722240.0 Ops/sec
value != null 1775227264.0 Ops/sec
value != undefined 1668017152.0 Ops/sec
value !== null 1573333888.0 Ops/sec
value !== undefined 1730352000.0 Ops/sec
value !== null && value !== undefined 1184758784.0 Ops/sec
!_.isNil(value) 1560670208.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)