[Top][All Lists]

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

[Gcl-devel] Re: speed for primality

From: Camm Maguire
Subject: [Gcl-devel] Re: speed for primality
Date: 11 Jul 2006 17:39:38 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

OK, a quick si::powm is in now, together with compiler inlines.  It
does seem quite fast.

In general, heavy users of gmp should be aware that the really big
cases can always do significantly better if the gmp has sse
instruction support.  Local builds should get this automatically, but
distributed binaries confine themselves to the minimal common x86
denominator.   I have yet found an example showing the speedup,

Take care,

Robert Boyer <address@hidden> writes:

> Here is how to get your primality test to really fly, I suspect.  Your
> function expt-a-to-i-mod-n is the key, I believe.  At least it is for RSA
> stuff.
> 'mpz_powm' in Gnu GMP implements 'expt-a-to-i-mod-n'.  GCL already uses
> GMP for *many* bignum operations.  GMP claims it is the fastest bignum
> package.
> It would probably only take Camm a very little amount of time to add powm
> (and many more GMP functions) to GCL.  It's on his to-do list, I believe.
> But it may be way down, I fear.  Or, we could learn a lot by spending
> weeks trying to learn how to do it ourselves, and I suspect it will all
> seem very easy when all is said and done.  Camm has already done the
> extremely hard work, interfacing GCL's heap and GMP's heap.
> cf. ~/my-partition/gcl-2.7.0/gmp3/mpz/powm.c
> Bob

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]