Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
value == null 27471726.0 Ops/sec
value == undefined 9853568.0 Ops/sec
value === null 27417704.0 Ops/sec
value === undefined 9870265.0 Ops/sec
value === null || value === undefined 7253299.5 Ops/sec
_.isNil(value) 9578269.0 Ops/sec
value != null 27197068.0 Ops/sec
value != undefined 9763013.0 Ops/sec
value !== null 27217666.0 Ops/sec
value !== undefined 9763931.0 Ops/sec
value !== null && value !== undefined 7165264.0 Ops/sec
!_.isNil(value) 9548964.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)


;