Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Windows
Desktop
20 days ago
Test name Executions per second
value == null 49055716.0 Ops/sec
value == undefined 45251332.0 Ops/sec
value === null 48897184.0 Ops/sec
value === undefined 48652780.0 Ops/sec
value === null || value === undefined 50625180.0 Ops/sec
_.isNil(value) 31545992.0 Ops/sec
value != null 55522096.0 Ops/sec
value != undefined 55112528.0 Ops/sec
value !== null 68018184.0 Ops/sec
value !== undefined 56523416.0 Ops/sec
value !== null && value !== undefined 56581224.0 Ops/sec
!_.isNil(value) 39406608.0 Ops/sec
typeof value == undefined 60191120.0 Ops/sec
typeof value === undefined 69044944.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)

  • typeof value == undefined

  • typeof value === undefined