Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
11 months ago
Test name Executions per second
value == null 17879038.0 Ops/sec
value == undefined 6322671.5 Ops/sec
value === null 17836632.0 Ops/sec
value === undefined 6366541.5 Ops/sec
value === null || value === undefined 4794130.0 Ops/sec
_.isNil(value) 6147380.0 Ops/sec
value != null 17653470.0 Ops/sec
value != undefined 6359529.5 Ops/sec
value !== null 17663774.0 Ops/sec
value !== undefined 6358944.5 Ops/sec
value !== null && value !== undefined 4839199.5 Ops/sec
!_.isNil(value) 6281042.0 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)