Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
typeof function 744365952.0 Ops/sec
call in function 155525360.0 Ops/sec
!!fn?.call 181939536.0 Ops/sec
fn?.call != null 185955728.0 Ops/sec
fn?.call != void 0 185692048.0 Ops/sec
isFuncTrue = fn?.call != undefined; 155329008.0 Ops/sec
Script Preparation code:
Tests:
  • typeof function

  • call in function

  • !!fn?.call

  • fn?.call != null

  • fn?.call != void 0

  • isFuncTrue = fn?.call != undefined;


;