Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36
Chrome 97
Windows
Desktop
2 years ago
Test name Executions per second
value == null 14834815.0 Ops/sec
value == undefined 5139469.5 Ops/sec
value === null 14771816.0 Ops/sec
value === undefined 5276340.0 Ops/sec
value === null || value === undefined 3695900.5 Ops/sec
_.isNil(value) 5156316.0 Ops/sec
value != null 14734090.0 Ops/sec
value != undefined 5202079.0 Ops/sec
value !== null 14874871.0 Ops/sec
value !== undefined 5294405.5 Ops/sec
value !== null && value !== undefined 3869252.5 Ops/sec
!_.isNil(value) 5187983.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)


;