From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.bugs Subject: Re: High run time variance Date: Tue, 30 Mar 2010 11:16:05 +0200 Message-ID: <87vdce186i.fsf@gnu.org> References: <4BB0D0A7.7080505@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1269940590 28413 80.91.229.12 (30 Mar 2010 09:16:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Mar 2010 09:16:30 +0000 (UTC) Cc: bug-guile@gnu.org To: Luca Saiu Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Mar 30 11:16:26 2010 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NwXYf-0006dU-0v for guile-bugs@m.gmane.org; Tue, 30 Mar 2010 11:16:25 +0200 Original-Received: from localhost ([127.0.0.1]:38207 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwXYe-0006nA-87 for guile-bugs@m.gmane.org; Tue, 30 Mar 2010 05:16:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwXYY-0006n3-BR for bug-guile@gnu.org; Tue, 30 Mar 2010 05:16:18 -0400 Original-Received: from [140.186.70.92] (port=41634 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwXYT-0006mv-0e for bug-guile@gnu.org; Tue, 30 Mar 2010 05:16:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwXYN-0001h2-P3 for bug-guile@gnu.org; Tue, 30 Mar 2010 05:16:12 -0400 Original-Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:3892) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwXYN-0001gw-J3; Tue, 30 Mar 2010 05:16:07 -0400 X-IronPort-AV: E=Sophos;i="4.51,333,1267398000"; d="scan'208";a="56162280" Original-Received: from laptop-147-210-128-170.labri.fr (HELO nixey) ([147.210.128.170]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 30 Mar 2010 11:16:06 +0200 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 10 Germinal an 218 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <4BB0D0A7.7080505@gnu.org> (Luca Saiu's message of "Mon, 29 Mar 2010 18:09:11 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4541 Archived-At: Hi Luca, Luca Saiu writes: > (define (fibo n) > (if (< n 2) > n > (+ (fibo (- n 1)) > (fibo (- n 2))))) This function is not tail-recursive, so it consumes stack space, which increases the amount of memory the GC has to scan. My guess is that this has to do with the time spent in GC. Could you try with a tail-recursive version? Thanks, Ludo=E2=80=99.