Run details:
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
IE 9
Windows 7
Desktop
3 years ago
Test name Executions per second
value == null 6107101.0 Ops/sec
value == undefined 4599367.0 Ops/sec
value === null 6085692.0 Ops/sec
value === undefined 4648882.0 Ops/sec
value === null || value === undefined 3083022.8 Ops/sec
_.isNil(value) 2639255.8 Ops/sec
value != null 6048082.0 Ops/sec
value != undefined 4357249.0 Ops/sec
value !== null 6026892.0 Ops/sec
value !== undefined 4625239.5 Ops/sec
value !== null && value !== undefined 2964402.5 Ops/sec
!_.isNil(value) 2607528.5 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)


;