[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: GCL, GMP linkage/ functional bindings not enough

From: Richard Fateman
Subject: [Gcl-devel] Re: GCL, GMP linkage/ functional bindings not enough
Date: Fri, 19 Dec 2003 12:07:15 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)

let us say you wish to do this:

a:= a+b*c.

If you do this in functional form you probably
end up with a sequence of operations that
requires allocating temporary space for
temp1 := b*c
and temp2 := temp1+ a
and then decreasing the reference count of a,
and doing a:=temp2.

Details will vary, but the point is you end up
allocating storage for temp1, a bignum, and
temp2, a bignum.   You can accomplish the same
result but with less garbage collection etc, if you can use a
unit operation that does a few arithmetic
operations and also clobbers a target.

Naturally you must be sure that clobbering memory
is OK under the circumstances.

So if you only give binding in your language to those
parts of GMP that are functional, you are missing some
potentially substantial efficiencies.


Camm Maguire wrote:


Richard Fateman <address@hidden> writes:

I think the bindings I use are a superset of the Python bindings, and in 
I found big time savings in being able to do fused multiply-add-store kinds of 
not possible in the usual functional language settings.

I wonder if you could provide the details here.

Take care,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]