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,
however. 

Take care,

Robert Boyer <[EMAIL PROTECTED]> 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                                            [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah


_______________________________________________
Gcl-devel mailing list
Gcl-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/gcl-devel

Reply via email to