Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.27
Chrome 105
Windows
Desktop
2 years ago
Test name Executions per second
value == null 12711219.0 Ops/sec
value == undefined 4671549.0 Ops/sec
value === null 12397940.0 Ops/sec
value === undefined 4707567.0 Ops/sec
value === null || value === undefined 3421061.0 Ops/sec
_.isNil(value) 4719252.5 Ops/sec
value != null 12432817.0 Ops/sec
value != undefined 4696093.0 Ops/sec
value !== null 12459971.0 Ops/sec
value !== undefined 4722591.0 Ops/sec
value !== null && value !== undefined 3439537.0 Ops/sec
!_.isNil(value) 4700917.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)