Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Chrome 84
Mac OS X 10.15.5
Desktop
4 years ago
Test name Executions per second
value == null 16545135.0 Ops/sec
value == undefined 5352440.0 Ops/sec
value === null 16486677.0 Ops/sec
value === undefined 5363865.0 Ops/sec
value === null || value === undefined 3984974.8 Ops/sec
_.isNil(value) 5344910.0 Ops/sec
value != null 16395003.0 Ops/sec
value != undefined 5311290.0 Ops/sec
value !== null 16510797.0 Ops/sec
value !== undefined 5383108.5 Ops/sec
value !== null && value !== undefined 4123093.8 Ops/sec
!_.isNil(value) 5498086.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)