Method calls are *even more* expensive, but in context of iteration vs 
recursion, non-tail-recursive sub calls are still higher cost than a FOR or 
WHILE loop, and Perl subs are higher cost than C subs. 

Have we mentioned the other solution? 
The Implicit loops of map {block} list; should produce more optimized code and 
reads better too. 

** not speaking or $dayjob **
 
Bill, typing with thumbs

----- Original Message -----
From: David Cantrell [mailto:da...@cantrell.org.uk]
Sent: Monday, April 08, 2013 08:35 AM
To: boston...@pm.org <boston...@pm.org>
Subject: Re: [Boston.pm] Perl and recursion

On Fri, Apr 05, 2013 at 09:20:16PM -0400, Jerrad Pierce wrote:

> Regardless, my understanding was that although perl's sub calls are
> somewhat expensive ...

I think it's *method calls* that are expensive, not subroutine calls.
The reason being that the subroutine that a method resolves to can
change at runtime.

-- 
David Cantrell | top google result for "topless karaoke murders"

    "There's a hole in my bucket, dear Liza, dear Liza."
    "WHAT MAKES YOU SAY THERE IS A HOLE IN YOUR BUCKET?"

_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

_______________________________________________
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to