Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0
Firefox 93
Fedora
Desktop
3 years ago
Test name Executions per second
value == null 946215872.0 Ops/sec
value == undefined 968467712.0 Ops/sec
value === null 1095766784.0 Ops/sec
value === undefined 1054059776.0 Ops/sec
value === null || value === undefined 1005883520.0 Ops/sec
_.isNil(value) 1003997824.0 Ops/sec
value != null 949543680.0 Ops/sec
value != undefined 951146752.0 Ops/sec
value !== null 999719360.0 Ops/sec
value !== undefined 1008359936.0 Ops/sec
value !== null && value !== undefined 821604032.0 Ops/sec
!_.isNil(value) 940254144.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)