develooper Front page | perl.perl5.porters | Postings from January 2008

Re: For 5.12: tail calls for methods

Thread Previous | Thread Next
From:
Chris Prather
Date:
January 18, 2008 05:58
Subject:
Re: For 5.12: tail calls for methods
Message ID:
46DE0458-070B-41D4-A20A-581457E3D65E@prather.org

On Jan 18, 2008, at 5:53 a, Dave Mitchell wrote:

>>> And how do you want to detect that?
>>
>> Simple, if the last call is to the same function, then it tail- 
>> recurses.
>
> That implies adding an extra test into every sub call, which we try to
> make as fast as possible.

That implies that a simple check[1] to eliminate "Deep Recursion  
in ... " should be sacrificed to the gods of speed.

-Chris

[1]: I assume that this is simple since we should already have the  
frame information available for caller() to work.

Thread Previous | Thread Next


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