Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 Edg/87.0.664.60
Chrome 87
Windows
Desktop
3 years ago
Test name Executions per second
value == null 13712294.0 Ops/sec
value == undefined 4301580.5 Ops/sec
value === null 13870737.0 Ops/sec
value === undefined 4231713.5 Ops/sec
value === null || value === undefined 3305145.2 Ops/sec
_.isNil(value) 4108031.5 Ops/sec
value != null 13442839.0 Ops/sec
value != undefined 4283578.0 Ops/sec
value !== null 13726259.0 Ops/sec
value !== undefined 4217864.0 Ops/sec
value !== null && value !== undefined 3289149.2 Ops/sec
!_.isNil(value) 4106623.8 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)


;