Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
value == null 12869020.0 Ops/sec
value == undefined 4478058.0 Ops/sec
value === null 12849771.0 Ops/sec
value === undefined 4487937.5 Ops/sec
value === null || value === undefined 3333926.2 Ops/sec
_.isNil(value) 4358027.5 Ops/sec
value != null 13190293.0 Ops/sec
value != undefined 4494895.5 Ops/sec
value !== null 12739616.0 Ops/sec
value !== undefined 4820309.0 Ops/sec
value !== null && value !== undefined 3371779.0 Ops/sec
!_.isNil(value) 4417264.5 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)