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/046225.html below:

[Python-Dev] Proper tail recursion

[Python-Dev] Proper tail recursion [Python-Dev] Proper tail recursion"Martin v. Löwis" martin at v.loewis.de
Thu Jul 15 21:38:55 CEST 2004
Christopher T King wrote:
> I originally thought I'd need to use gcc's tail call optimization to
> achieve my aim (since CPython works the same way), but it turned out a 
> simple loop would suffice.  Unless Jython's implementation is radically 
> different (i.e. it doesn't pass frame objects to a function that evaluates 
> them) then it should be able to be implemented similarly.

Yes, Jython is radically different. Each function gets its own Java byte 
code, and calls are implemented as Java "invoke*" instructions. So if 
you call a different function at the tail, you can't replace that with a
jump instruction.

Regards,
Martin

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