Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Chrome 97
Windows
Desktop
2 years ago
Test name Executions per second
value == null 11627885.0 Ops/sec
value == undefined 4419749.5 Ops/sec
value === null 11851978.0 Ops/sec
value === undefined 4485766.5 Ops/sec
value === null || value === undefined 1798774.1 Ops/sec
_.isNil(value) 2574583.8 Ops/sec
value != null 12091744.0 Ops/sec
value != undefined 4406810.5 Ops/sec
value !== null 7591856.0 Ops/sec
value !== undefined 2459207.2 Ops/sec
value !== null && value !== undefined 2679239.8 Ops/sec
!_.isNil(value) 2458248.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)


;