From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: tail call reduction Date: Thu, 10 Feb 2005 23:50:11 -0500 Organization: Bell Sympatico Message-ID: <87vf8zso2h.fsf-monnier+gnu.emacs.help@gnu.org> References: <87k6pgwy7u.fsf@ID-87814.user.uni-berlin.de> <87psz831tp.fsf-monnier+gnu.emacs.help@gnu.org> <877jlg9gq8.fsf@ID-87814.user.uni-berlin.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1108098307 1651 80.91.229.6 (11 Feb 2005 05:05:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Feb 2005 05:05:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 11 06:05:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CzSzD-0001eM-00 for ; Fri, 11 Feb 2005 06:05:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CzTE5-0007ER-Rj for geh-help-gnu-emacs@m.gmane.org; Fri, 11 Feb 2005 00:20:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.glorb.com!wns13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:ZV2BqZwTwKpR8GkYDjVrbmHMLUE= Original-Lines: 16 Original-NNTP-Posting-Host: 65.92.240.235 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1108097412 65.92.240.235 (Thu, 10 Feb 2005 23:50:12 EST) Original-NNTP-Posting-Date: Thu, 10 Feb 2005 23:50:12 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:128489 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:24021 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:24021 > 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