Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0
Opera 112
Windows
Desktop
4 months ago
Test name Executions per second
value == null 28463042.0 Ops/sec
value == undefined 11069128.0 Ops/sec
value === null 27965198.0 Ops/sec
value === undefined 11065667.0 Ops/sec
value === null || value === undefined 8231451.0 Ops/sec
_.isNil(value) 10750890.0 Ops/sec
value != null 28294458.0 Ops/sec
value != undefined 10776224.0 Ops/sec
value !== null 28200362.0 Ops/sec
value !== undefined 10948437.0 Ops/sec
value !== null && value !== undefined 8253339.5 Ops/sec
!_.isNil(value) 10758463.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)