Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Windows
Desktop
2 years ago
Test name Executions per second
value == null 15852277.0 Ops/sec
value == undefined 5233370.0 Ops/sec
value === null 15807391.0 Ops/sec
value === undefined 5331719.5 Ops/sec
value === null || value === undefined 3981754.2 Ops/sec
_.isNil(value) 5328061.5 Ops/sec
value != null 15663234.0 Ops/sec
value != undefined 5268573.5 Ops/sec
value !== null 15608625.0 Ops/sec
value !== undefined 5326259.0 Ops/sec
value !== null && value !== undefined 3984966.8 Ops/sec
!_.isNil(value) 5324908.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)