Run details:
Mozilla/5.0 (Linux; Android 9; ONEPLUS A5010) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.111 Mobile Safari/537.36
Chrome Mobile 84
Android
Mobile
4 years ago
Test name Executions per second
value == null 2427264.5 Ops/sec
value == undefined 849227.9 Ops/sec
value === null 2428181.8 Ops/sec
value === undefined 875523.2 Ops/sec
value === null || value === undefined 608492.8 Ops/sec
_.isNil(value) 825315.0 Ops/sec
value != null 2427369.5 Ops/sec
value != undefined 851363.9 Ops/sec
value !== null 2422978.8 Ops/sec
value !== undefined 854945.6 Ops/sec
value !== null && value !== undefined 608216.3 Ops/sec
!_.isNil(value) 823433.8 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)


;