Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Windows
Desktop
2 years ago
Test name Executions per second
value == null 19758748.0 Ops/sec
value == undefined 6913932.0 Ops/sec
value === null 19781894.0 Ops/sec
value === undefined 6990280.5 Ops/sec
value === null || value === undefined 5152656.5 Ops/sec
_.isNil(value) 6939607.0 Ops/sec
value != null 19746572.0 Ops/sec
value != undefined 6915248.5 Ops/sec
value !== null 19724778.0 Ops/sec
value !== undefined 6921766.0 Ops/sec
value !== null && value !== undefined 5117947.5 Ops/sec
!_.isNil(value) 6889686.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)