Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.50
Chrome 113
Windows
Desktop
one year ago
Test name Executions per second
value == null 615247936.0 Ops/sec
value == undefined 499255200.0 Ops/sec
value === null 597683968.0 Ops/sec
value === undefined 499650432.0 Ops/sec
value === null || value === undefined 399207136.0 Ops/sec
_.isNil(value) 462255360.0 Ops/sec
value != null 605646720.0 Ops/sec
value != undefined 419401056.0 Ops/sec
value !== null 490905504.0 Ops/sec
value !== undefined 292311232.0 Ops/sec
value !== null && value !== undefined 320664800.0 Ops/sec
!_.isNil(value) 406184224.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)