Run details:
Mozilla/5.0 (Linux; Android 12; SM-G986B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.101 Mobile Safari/537.36
Chrome Mobile 98
Android
Mobile
2 years ago
Test name Executions per second
value == null 11996305.0 Ops/sec
value == undefined 4024979.2 Ops/sec
value === null 11667399.0 Ops/sec
value === undefined 4032183.0 Ops/sec
value === null || value === undefined 3009413.5 Ops/sec
_.isNil(value) 3972140.2 Ops/sec
value != null 11593349.0 Ops/sec
value != undefined 4001863.2 Ops/sec
value !== null 11572718.0 Ops/sec
value !== undefined 4025245.5 Ops/sec
value !== null && value !== undefined 2994701.0 Ops/sec
!_.isNil(value) 3890438.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)