Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
value == null 30700646.0 Ops/sec
value == undefined 10726133.0 Ops/sec
value === null 30957280.0 Ops/sec
value === undefined 11050444.0 Ops/sec
value === null || value === undefined 8166012.5 Ops/sec
_.isNil(value) 10606334.0 Ops/sec
value != null 31449564.0 Ops/sec
value != undefined 11077749.0 Ops/sec
value !== null 31459298.0 Ops/sec
value !== undefined 10843328.0 Ops/sec
value !== null && value !== undefined 8126794.0 Ops/sec
!_.isNil(value) 10472547.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)