Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
value == null 13962800.0 Ops/sec
value == undefined 4855095.5 Ops/sec
value === null 13994496.0 Ops/sec
value === undefined 4927615.5 Ops/sec
value === null || value === undefined 3651562.8 Ops/sec
_.isNil(value) 4850119.5 Ops/sec
value != null 14152233.0 Ops/sec
value != undefined 4904745.0 Ops/sec
value !== null 14187827.0 Ops/sec
value !== undefined 4966123.0 Ops/sec
value !== null && value !== undefined 3670942.5 Ops/sec
!_.isNil(value) 4872453.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)