Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Chrome 96
Windows
Desktop
2 years ago
Test name Executions per second
value == null 12582350.0 Ops/sec
value == undefined 4716899.0 Ops/sec
value === null 11427492.0 Ops/sec
value === undefined 4186505.2 Ops/sec
value === null || value === undefined 3026188.2 Ops/sec
_.isNil(value) 3901284.2 Ops/sec
value != null 11022444.0 Ops/sec
value != undefined 4120861.2 Ops/sec
value !== null 11019253.0 Ops/sec
value !== undefined 4234451.5 Ops/sec
value !== null && value !== undefined 3032720.8 Ops/sec
!_.isNil(value) 4182708.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)


;