Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36
Chrome 88
Mac OS X 10.15.5
Desktop
3 years ago
Test name Executions per second
value == null 15228743.0 Ops/sec
value == undefined 4755778.5 Ops/sec
value === null 15580703.0 Ops/sec
value === undefined 4814337.0 Ops/sec
value === null || value === undefined 3628318.5 Ops/sec
_.isNil(value) 4694966.5 Ops/sec
value != null 15686758.0 Ops/sec
value != undefined 4811719.5 Ops/sec
value !== null 15624484.0 Ops/sec
value !== undefined 4786782.0 Ops/sec
value !== null && value !== undefined 3645467.2 Ops/sec
!_.isNil(value) 4635722.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)


;