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
one year ago
Test name Executions per second
value == null 31833840.0 Ops/sec
value == undefined 11483386.0 Ops/sec
value === null 32382258.0 Ops/sec
value === undefined 11660583.0 Ops/sec
value === null || value === undefined 8667036.0 Ops/sec
_.isNil(value) 11347725.0 Ops/sec
value != null 32650396.0 Ops/sec
value != undefined 11739604.0 Ops/sec
value !== null 32730724.0 Ops/sec
value !== undefined 11767190.0 Ops/sec
value !== null && value !== undefined 8600930.0 Ops/sec
!_.isNil(value) 11378006.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)