Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Mac OS X 10.15.7
Desktop
10 months ago
Test name Executions per second
value == null 31685316.0 Ops/sec
value == undefined 12424168.0 Ops/sec
value === null 31737154.0 Ops/sec
value === undefined 12423849.0 Ops/sec
value === null || value === undefined 9345016.0 Ops/sec
_.isNil(value) 12069292.0 Ops/sec
value != null 31686070.0 Ops/sec
value != undefined 12315399.0 Ops/sec
value !== null 31570584.0 Ops/sec
value !== undefined 12405750.0 Ops/sec
value !== null && value !== undefined 9331679.0 Ops/sec
!_.isNil(value) 12079458.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)