Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Windows
Desktop
10 months ago
Test name Executions per second
value == null 11935791.0 Ops/sec
value == undefined 3802743.5 Ops/sec
value === null 10930167.0 Ops/sec
value === undefined 4069035.5 Ops/sec
value === null || value === undefined 2662936.5 Ops/sec
_.isNil(value) 3763371.2 Ops/sec
value != null 12006048.0 Ops/sec
value != undefined 3898158.2 Ops/sec
value !== null 10366243.0 Ops/sec
value !== undefined 3540010.5 Ops/sec
value !== null && value !== undefined 2709888.2 Ops/sec
!_.isNil(value) 3250910.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)


;