Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:48.0) Gecko/20100101 Firefox/48.0
Firefox 48
Mac OS X 10.15
Desktop
4 years ago
Test name Executions per second
value == null 360702848.0 Ops/sec
value == undefined 178538016.0 Ops/sec
value === null 361207168.0 Ops/sec
value === undefined 177550176.0 Ops/sec
value === null || value === undefined 131702120.0 Ops/sec
_.isNil(value) 132202176.0 Ops/sec
value != null 327949504.0 Ops/sec
value != undefined 175174736.0 Ops/sec
value !== null 331219392.0 Ops/sec
value !== undefined 178023504.0 Ops/sec
value !== null && value !== undefined 130833664.0 Ops/sec
!_.isNil(value) 128645672.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)