Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:82.0) Gecko/20100101 Firefox/82.0
Firefox 82
Ubuntu
Desktop
4 years ago
Test name Executions per second
value == null 224228512.0 Ops/sec
value == undefined 115011552.0 Ops/sec
value === null 223270176.0 Ops/sec
value === undefined 115293936.0 Ops/sec
value === null || value === undefined 86455632.0 Ops/sec
_.isNil(value) 90560168.0 Ops/sec
value != null 224664800.0 Ops/sec
value != undefined 116409136.0 Ops/sec
value !== null 228428320.0 Ops/sec
value !== undefined 115927536.0 Ops/sec
value !== null && value !== undefined 84833744.0 Ops/sec
!_.isNil(value) 92836320.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)