in reply to Cost of passing function references

Your reviewer is severely misinformed about how perl works internally. Subs are compiled to an internal form just once, and at run time are accessed via the "CV" slot in a glob structure (f(...) form) or via the "SvRV" slot in a pad variable ($f->(...) form). There is almost no difference between the two.

I just tried profiling both forms on perl 5.22.0. Calling an empty function with 3 args used 665 x86_64 instruction reads for the direct form, and 675 for the indirect form: a 1.5% difference. For a real sub that actually does something in its body, the difference would be negligible.

Dave.