primep, other systems (...) PARI



Raymond Toy writes:
 > Yes, cmucl can be quite good on floating-point stuff, but, bignum
 > arithmetic isn't particularly fast on cmucl.  Clisp usually wins big
 > here.  And the division/truncation operations are done using the
 > standard pencil-and-paper algorithms (I think).

Yes, that is also my impression. Nevertheless I think, we should try
to implement the number theoretic algorithms in Lisp,and where it is
too slow, we should ask the maintainers of the respective CL compiler
to do something about it (with our possible help). This way, the lisp
community would profit most.

 > I implemented a Karatsuba multiplier (in Lisp) for cmucl using
 > cmucl-internal functions and the cross-over point is 512 to 1024 bits
 > long.  I was hoping the cross-over point would be lower, but that's
 > the best I could do.  I had an FFT version once too, but I was never
 > sure that I got all the rounding and stuff right, so I think I gave
 > up.  (Still have the FFT code, but probably not the bignum part of
 > it.) 
 > 
 >     Andreas> But prime-testing in the range of up to a few hundred digits should be
 >     Andreas> doable in lisp. And I am willing to help as much as I can.
 > 
 > Likewise.

Then, let's do it.

'Andreas
-- 
Wherever I lay my .emacs, there´s my $HOME.