Optimizing Modulus

Kevin Ryde user42 at zip.com.au
Wed Oct 29 07:24:50 CET 2003


Sisyphus <kalinabears at iinet.net.au> writes:
>
> 'mpz_sieve_eratosthenes(max_prime)'

Hmm.  Probably a bit outside the scope of gmp.  Torbjorn put some
stuff in demos/primes.c a while back though.  I think there's a fair
bit of theory about the best way to sieve, in general.

> Another issue might be that it is slower to iterate through an mpz bit
> by bit than it is to iterate through an array of ints bit by bit.

Probably.


More information about the gmp-discuss mailing list