[Top][All Lists]

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

[Gcl-devel] Re: GCL, GMP linkage

From: Camm Maguire
Subject: [Gcl-devel] Re: GCL, GMP linkage
Date: 15 Dec 2003 16:11:00 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


Well, the way it works in C, at least with gcc, is that only
needed/used symbols are taken from a library and placed in the symbol
table of the executable.  One should be able to override this with
-Wl,-E to the linker command line, but this would not be useful in a
lisp without a lisp interface to the functions in any case, except
arguably that the user could then write a lisp interface without
recompiling.  It should not be too hard to do this (including the lisp
interface) on a semi-automated basis for any given external shared
library, but I'm not really sure if this isn't a really low priority.
GCL actually has hooks already, currently disabled for Linux, for
linking in libraries at runtime without loss of session.  If anyone
needs a particular gmp function in the short term, please let me know
and I'll make it available.

One thing I've been mulling over regarding GCL built binaries is an
automatic selection of the fastest gmp routines possible for the
general architecture at runtime, i.e. sse1, sse2, etc.  I haven't
pursued this as I haven't been able to see any noticeable performance
increase when using sse2 routines even on heavy bignum lisp
benchmarks.  I think you might have made this observation in the
past.  But then again perhaps I'm using the wrong tests.

Take care,

Richard Fateman <address@hidden> writes:

> I would have expected that, if gcl is linked with gmp.dll,
> that all the entry points in gmp would be accessible via
> a foreign function linkage.  I believe all of the entry
> points are available via FFI in Allegro CL, which has its
> own bignum facility, but for bignums longer that a few words
> is not as fast as the GMP routines.

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

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