Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Chrome 83
Windows
Desktop
4 years ago
Test name Executions per second
value == null 7130266.5 Ops/sec
value == undefined 2483952.5 Ops/sec
value === null 7155242.5 Ops/sec
value === undefined 2496345.0 Ops/sec
value === null || value === undefined 1848806.1 Ops/sec
_.isNil(value) 2436682.8 Ops/sec
value != null 7149654.5 Ops/sec
value != undefined 2495760.2 Ops/sec
value !== null 7153115.0 Ops/sec
value !== undefined 2507308.0 Ops/sec
value !== null && value !== undefined 1844022.2 Ops/sec
!_.isNil(value) 2444565.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)