We don't bite newbies here... much | |
PerlMonks |
Re^4: Proxying (almost) all methods in a class for mass memoizationby davido (Cardinal) |
on Aug 16, 2018 at 20:24 UTC ( [id://1220459]=note: print w/replies, xml ) | Need Help?? |
I wonder what it takes to trigger that optimization.
I mean I do see a difference, but other optimizations between Perl 5.10 and Perl 5.28 seem to be far more significant (probably the integer optimization). Here is the sample code:
The reason for the double sub call is to assure that the return value is being obtained, and not discarded due to context. So we do have the double-call overhead, but it's the same overhead for both sides of the test. Anyway, where there had been a 9% difference in favor of bare returns in 5.10, there's now a statistically insignificant 3% difference that seems to go either direction. Dave
In Section
Cool Uses for Perl
|
|