Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Chrome 86
Linux
Desktop
4 years ago
Test name Executions per second
value == null 15582144.0 Ops/sec
value == undefined 5398214.5 Ops/sec
value === null 15463723.0 Ops/sec
value === undefined 5380304.0 Ops/sec
value === null || value === undefined 3973904.8 Ops/sec
_.isNil(value) 5129856.5 Ops/sec
value != null 15158432.0 Ops/sec
value != undefined 5252398.0 Ops/sec
value !== null 14737343.0 Ops/sec
value !== undefined 5415808.5 Ops/sec
value !== null && value !== undefined 3910315.8 Ops/sec
!_.isNil(value) 5052064.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)


;