Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 Edg/94.0.992.38
Chrome 94
Windows
Desktop
3 years ago
Test name Executions per second
value == null 10029560.0 Ops/sec
value == undefined 3659917.5 Ops/sec
value === null 9998873.0 Ops/sec
value === undefined 3716237.0 Ops/sec
value === null || value === undefined 2692203.8 Ops/sec
_.isNil(value) 3492210.0 Ops/sec
value != null 9889472.0 Ops/sec
value != undefined 3696709.5 Ops/sec
value !== null 9998035.0 Ops/sec
value !== undefined 3666748.0 Ops/sec
value !== null && value !== undefined 2678914.2 Ops/sec
!_.isNil(value) 3487900.8 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)


;