in reply to Cost of passing function references
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.
|
|---|