Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36
Chrome 90
Windows
Desktop
3 years ago
Test name Executions per second
value == null 11278625.0 Ops/sec
value == undefined 4069875.2 Ops/sec
value === null 11186549.0 Ops/sec
value === undefined 4108243.0 Ops/sec
value === null || value === undefined 3034023.0 Ops/sec
_.isNil(value) 3990772.8 Ops/sec
value != null 11218684.0 Ops/sec
value != undefined 4062415.5 Ops/sec
value !== null 11198792.0 Ops/sec
value !== undefined 4144060.0 Ops/sec
value !== null && value !== undefined 3016854.8 Ops/sec
!_.isNil(value) 4007696.2 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)


;