Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
Chrome 88
Windows
Desktop
3 years ago
Test name Executions per second
value == null 8786667.0 Ops/sec
value == undefined 3065817.2 Ops/sec
value === null 9791749.0 Ops/sec
value === undefined 2652030.5 Ops/sec
value === null || value === undefined 2248913.8 Ops/sec
_.isNil(value) 3225428.5 Ops/sec
value != null 9695557.0 Ops/sec
value != undefined 2718024.0 Ops/sec
value !== null 9535174.0 Ops/sec
value !== undefined 3286410.0 Ops/sec
value !== null && value !== undefined 2050914.8 Ops/sec
!_.isNil(value) 2992869.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)


;