It seems like there is some sort of evaluation overhead related to the ResourceFunction
wrapper that I'd like to avoid. This is especially pronounced for functions with attributes. Take, for example, SymbolQ
, which is essentially a wrapper for a built-in function from the Developer
context:
Attributes[mySymbolQ] = {HoldAllComplete};
mySymbolQ[x_] := Developer`HoldSymbolQ[x];
x = 1;
ResourceFunction["SymbolQ"][x] // RepeatedTiming
mySymbolQ[x] // RepeatedTiming
{0.00068, True}
{5.2*10^-7, True}
Is there an easy way to avoid this slowdown without having to copy the source code from the resource function completely?