A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-July/046306.html below:

[Python-Dev] Re: Proper tail recursion

[Python-Dev] Re: Proper tail recursion [Python-Dev] Re: Proper tail recursionPhillip J. Eby pje at telecommunity.com
Fri Jul 16 20:03:25 CEST 2004
At 10:45 AM 7/16/04 -0700, Josiah Carlson wrote:
>IMO it shouldn't be only about tail-call optimizations.  Andrew Koenig
>suggested that frames be allocated from the heap, which if it is
>possible (is there anything that gets executed directly by the processor
>so we have to worry about processors supporting NX?), seems to remove
>the C stack limit.

Frames *are* allocated on the heap.  That's not the problem.  The problem 
is that the interpreter *has* to use the C stack to call C functions, and 
Python objects are implemented using C functions.  Therefore, invoking 
operations on Python objects uses the C stack, in the general case.

(Which is why some versions of Stackless made extensive modifications to 
the Python core, in order to maximize the number of specific cases where C 
function calls could be avoided.)

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4