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

[Python-Dev] Proper tail recursion

[Python-Dev] Proper tail recursion [Python-Dev] Proper tail recursionAndrew Koenig ark-mlist at att.net
Thu Jul 15 18:07:53 CEST 2004
> But in this case what is tail-call optimization going to do for you?
> You still require a stack at least the size of the height of your tree
> because of traverse(t.left) since that can not be tail-call optimized
> away, with the proposed algorithm.

I thought I had pointed that out.  Lisp lists are really trees, the nodes of
which usually have very short left subtrees.  For example, (3 (4 5) 6 7 8)
is a tree in which the maximum left depth is 2 and maximum right depth is 5.
For such data structures, tail-call optimization would make a big difference
in practice even if it wouldn't matter in theory.

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