Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.1 Mobile/15E148 Safari/604.1
Mobile Safari 17
iOS 17.1.1
Mobile
one year ago
Test name Executions per second
typeof function 9300926.0 Ops/sec
call in function 6173735.5 Ops/sec
!!fn?.call 6911329.0 Ops/sec
fn?.call != null 9090097.0 Ops/sec
fn?.call != void 0 8914031.0 Ops/sec
isFuncTrue = fn?.call != undefined; 2929500.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;


;