unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: tail call reduction
Date: Thu, 10 Feb 2005 23:50:11 -0500	[thread overview]
Message-ID: <87vf8zso2h.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 877jlg9gq8.fsf@ID-87814.user.uni-berlin.de

> I don't recall the actual cases where I bumped into problems. IIRC I
> got beyond `max-lisp-eval-depth' once or twice with recursive
> functions on a depth-first traversal of medium-sized trees. Since the
> default of said variable is 300, this should be o.k.. Hm, well, I
> guess it was with a loop implemented by recursive calls.

The depth used by Emacs might be significantly smaller if the code is
byte-compiled.  And you can bump up the max-lisp-eval-depth (you can even
bump it locally inside your code with a let-binding).

Or you can change your algorithm to use trees that are better balanced and
will thus not be so deep (though not always if you're using something like
splay trees).


        Stefan

  reply	other threads:[~2005-02-11  4:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-10  9:39 tail call reduction Oliver Scholz
2005-02-10 10:21 ` Oliver Scholz
2005-02-10 14:56 ` Stefan Monnier
2005-02-10 22:45   ` Oliver Scholz
2005-02-11  4:50     ` Stefan Monnier [this message]
2005-03-02 16:20     ` David Combs
2005-03-02 18:06       ` Oliver Scholz
2005-03-04  0:15         ` Miles Bader
     [not found]         ` <mailman.2542.1109897787.32256.help-gnu-emacs@gnu.org>
2005-03-04  0:56           ` Johan Bockgård
2005-03-04 14:01             ` Miles Bader

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vf8zso2h.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).