[squeak-dev] Integer>>isPrime why reverting Knuth's algorithm P
(probabilistic primality test) with iteration over division with even
numbers?
Enrico Spinielli
enrico.spinielli at googlemail.com
Sun Dec 20 12:19:25 UTC 2009
Again my point is:
was there a problem to solve?
Was it about performance?
If the answer is YES, then a fix (your proposal for example) is needed
if NOT leave what was there originally...double implementation is just
making maintenance more difficult.
Optimizing for the sake of it has never proved correct...
My 2 cents...
Bye
Enrico
On Sat, Dec 19, 2009 at 11:18 PM, Cédrick Béler <cdrick65 at gmail.com> wrote:
> or simply
>
> SmallInteger>>isPrime
> the current version
>
> LargePositiveInteger>>isPrime
> Knuth's version
>
>
> --
> Cédrick
>
>
>
>
--
Enrico Spinielli
"Do Androids dream of electric sheep?"— Philip K. Dick
"Hear and forget; see and remember;do and understand."—Mitchel Resnick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20091220/d8dd3c3a/attachment.htm
More information about the Squeak-dev
mailing list
|