Not generally, no; property access is already quite optimal. What makes it fast is that something like foo.bar is lowered to getproperty(foo, :bar), where that :bar is a constant Symbol. This is very easy to propagate into getproperty as a constant, so it’s not beneficial to further wrap that in another function call, as the two would fundamentally do & rely on the same thing to be fast.
3 Likes