From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Betoes Newsgroups: gmane.lisp.guile.user Subject: Re: Floating Point? Date: Mon, 8 Sep 2003 11:43:59 -0300 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <20030908144359.GA2046@milla.autsens.localnet> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1063040085 13653 80.91.224.249 (8 Sep 2003 16:54:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2003 16:54:45 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 08 18:55:06 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19wPIA-00038Y-00 for ; Mon, 08 Sep 2003 18:55:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19wPE2-0007kk-Ex for guile-user@m.gmane.org; Mon, 08 Sep 2003 12:50:50 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19wNpP-0002dT-BN for guile-user@gnu.org; Mon, 08 Sep 2003 11:21:19 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19wNpI-0002aL-F5 for guile-user@gnu.org; Mon, 08 Sep 2003 11:21:13 -0400 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.22) id 19wNk6-00011d-M3 for guile-user@gnu.org; Mon, 08 Sep 2003 11:15:50 -0400 Original-Received: from [200.148.197.217] (helo=adsl-nrp8-C8B73A51.sao.terra.com.br) by mx20.gnu.org with esmtp (Exim 4.22) id 19wNcl-00045P-BH for guile-user@gnu.org; Mon, 08 Sep 2003 11:08:15 -0400 Original-Received: from milla.autsens.localnet ([192.168.131.3] ident=mail) by adsl-nrp8-C8B73A51.sao.terra.com.br with esmtp (Exim 3.35 #1 (Debian)) id 19wNFI-0001WS-00 for ; Mon, 08 Sep 2003 14:44:00 +0000 Original-Received: from betoes by milla.autsens.localnet with local (Exim 3.35 #1 (Debian)) id 19wNFH-0000XZ-00 for ; Mon, 08 Sep 2003 11:43:59 -0300 Original-To: guile-user@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2243 On Sat, Sep 06, 2003 at 01:10:21PM -0500, Peter S. Christopher wrote: > Hi there listers, > > I've been thinking about how to make my floating point > calculations go faster. I thought that my FP calculations where so slow I have doubt about the speed of floating point calculations too, but because of arbitrary precision of guile floating point arthmetics... Does it have a way to turn off this feature? Does it really have influence on speedy calculations? Redefinitions of math functions would be woth, but an expensive way to increase such speed... Any idea? > because of excessive allocation. i.e. if a and b are floats then > (+ a b) will return a *NEW* float with the value a+b in it. Is this > true? If this where true I thought that I could speed up my calculations > by replacing the normal operands (+,-,*,/) by versions that don't allocate > new cells (a-la (reg+, reg-, reg*, reg/)). Something like > > (reg+ temp_1 a b) > > would evaluate to > > SCM_REAL_VALUE(temp_1) = > scm_num2dbl(a, FUNC_NAME)+scm_num2dbl(b, FUNC_NAME); > > in some C extension function. This would prevent the allocation of the > additional doubles. The real advantage, of course, would be in expressions > like > > (let ((register-1 0.0)) > (do ((i 0 (+ i 1)) > ((> i big-huge-number)) > (set-my-double-array i > (reg+ register-1 5.7 (reg* register-1 3.1 i)))))) > > where this loop sets element i of my-double-array to 3.1*i+5.7. By my > reasoning (which may be suspect) this would save me many-many cell > allocations (2*big-huge-number to be exact). > > So how far off base am I? And, does anyone have other ideas on how > to improve my floating point performance (within the guile world that is). > > Thanks for any help, > Pete Christopher _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user