primep, other systems (...) PARI



Raymond Toy writes:
 > >>>>> "Pedro" == Pedro Fortuny Ayuso <P.Fortuny@maths.qmul.ac.uk> writes:
 >Pedro> That would be a good idea, although IMO, primality tests are simple 
 >Pedro> enough to require very little lisp coding, and we would avoid foreign
 >Pedro> function calls. If this approach looks interesting for enough people,
 >Pedro> I am eager to start working on this (I am trying to learn lisp by now,
 >Pedro> and anyway the gurus in the list are surely kind enough to correct
 >Pedro> my mistakes).
 > 
 > While I would like to see this, I suspect that you won't be able to
 > make this run fast enough to be usable.  The code will probably cause
 > so much consing that it runs slowly.  A pure guess on my part.

I don't think that it will cons to death (so to speak). At least not
on cmucl, since python is very good at optimizing numerical code. And
I would certainly prefer to have as much in lisp as possible, rather
than using foreign libraries. As comfortable as it may seem, since it
is already ready to include and run, you loose all the value that lisp
can give you. And though Lisp bignum arithmetic may not be the fastest
available, it will not matter for the numbers that we are likely to
tackle. If you are really going for the raw speed, then there is no
way around assembler, and equally important the fast fft-based
algorithms.
But prime-testing in the range of up to a few hundred digits should be
doable in lisp. And I am willing to help as much as I can.

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