Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
value == null 14517164.0 Ops/sec
value == undefined 4988818.5 Ops/sec
value === null 14497392.0 Ops/sec
value === undefined 5011308.0 Ops/sec
value === null || value === undefined 3745271.2 Ops/sec
_.isNil(value) 4620788.5 Ops/sec
value != null 14674188.0 Ops/sec
value != undefined 5025463.0 Ops/sec
value !== null 14673038.0 Ops/sec
value !== undefined 5075768.5 Ops/sec
value !== null && value !== undefined 3743566.2 Ops/sec
!_.isNil(value) 4663332.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)


;