Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Windows
Desktop
2 years ago
Test name Executions per second
value == null 8562434.0 Ops/sec
value == undefined 3589661.0 Ops/sec
value === null 7939878.5 Ops/sec
value === undefined 3390755.5 Ops/sec
value === null || value === undefined 2663184.0 Ops/sec
_.isNil(value) 3340439.8 Ops/sec
value != null 7900707.0 Ops/sec
value != undefined 3278652.5 Ops/sec
value !== null 7893695.0 Ops/sec
value !== undefined 3276571.8 Ops/sec
value !== null && value !== undefined 2381221.8 Ops/sec
!_.isNil(value) 3124060.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)