in reply to Re^3: Efficiency: Recursive functions while de-subbing my program
in thread Efficiency: Recursive functions while de-subbing my program
Doing nothing useful a whopping 400% faster is not actually a useful accomplishment.
The point of the benchmark was, that before you get around to doing anything useful with a subroutine, you have to pay the price of doing that "nothing useful". (That's specifically for Tye, because I know the other readers will have already got that.)
We've been here before, and the final outcome of that thread hasn't changed.
And the reality of OO's propensity to use small subs hasn't changed either, except that with the advent of Moouse et al. each method call can involve half a dozen subroutines calls once you've used before, after, around, inbetween, isa, wanna, coulda etc.
And the reality of the affect of Perl's subroutine overhead relative to that of other languages hasn't changed either.
So, whilst in the OPs target case, subroutine overhead is a red-herring, dismissing it completely as peanuts is a bad message in the wider scheme of things.
As with all things, optimisation is about understanding what to do when; and when not; with the key being understanding, not blanket dismissal.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: Efficiency: Recursive functions while de-subbing my program (arithmetic)
by tye (Sage) on Jul 13, 2013 at 05:52 UTC | |
by BrowserUk (Patriarch) on Jul 14, 2013 at 08:46 UTC |