Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Chrome 90
Windows
Desktop
2 years ago
Test name Executions per second
value == null 18673146.0 Ops/sec
value == undefined 6806408.0 Ops/sec
value === null 18767508.0 Ops/sec
value === undefined 6809454.0 Ops/sec
value === null || value === undefined 4980521.0 Ops/sec
_.isNil(value) 6785712.5 Ops/sec
value != null 18476240.0 Ops/sec
value != undefined 6810194.5 Ops/sec
value !== null 18296406.0 Ops/sec
value !== undefined 6866881.0 Ops/sec
value !== null && value !== undefined 4974538.5 Ops/sec
!_.isNil(value) 6697200.5 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)


;