develooper Front page | perl.perl5.porters | Postings from May 2012

[perl #40243] Interesting variation on 'Out of memory'

Thread Previous
From:
James E Keenan via RT
Date:
May 7, 2012 18:12
Subject:
[perl #40243] Interesting variation on 'Out of memory'
Message ID:
rt-3.6.HEAD-4610-1336439537-1268.40243-15-0@perl.org
On Tue Aug 29 23:02:54 2006, andreas.koenig.gmwojprw@franz.ak.mind.de wrote:
> >>>>> On Mon, 28 Aug 2006 23:35:14 -0700, chromatic
> <chromatic@wgz.org> said:
> 
>   > On Sunday 27 August 2006 03:21, Andreas J Koenig wrote:
>  >> sub Ack
>  >> {
>  >> my ($x, $y) = @_;
>  >>
>  >> return $y + 1         if $x == 0;
>  >> return Ack($x - 1, 1) if $y == 0;
>  >>
>  >> return Ack($x - 1, Ack($x, $y - 1));
>  >> }
> 
>   > I can't find the message now, but if I recall correctly, Dave
> Mitchell
>   > explained that using highly-recursive calls like this without
> explicit
>   > temporary variables means that Perl won't free the temps until
> much, much
>   > later.
> 
> Thanks!
> 
>   > Unfortunately, I didn't document *that* in Perl Hacks #66, but if
> you want to
>   > suggest memoization to the shootout folks, Perl looks a *lot*
> better.
> 
> From reading their FAQ I'm sure they will not accept memoization but
> maybe they will accept my variant. I'm gonna write them.
> 

Andreas:

Are there still issues here that warrant keeping this RT open?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=40243

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About