[Cuis-dev] Problems in class Number

Andres Valloud ten at smallinteger.com
Thu Oct 10 22:09:08 PDT 2019


Euclid's gcd algorithm converges to the answer exponentially with base 
phi.  Larger small integers help amortize the extra cost.

On 10/10/19 21:53, Phil B wrote:
> Was that primarily due to the 64-bit version mostly fitting within 
> SmallInteger?  I find many numeric performance issues just melt away by 
> staying away from Large*Integer (and Fraction)... they're great for 
> maintaining accuracy, lousy for performance.  As in multiples to orders 
> of magnitude worse depending on what you're doing.
> 
> On Fri, Oct 11, 2019 at 12:40 AM Andres Valloud via Cuis-dev 
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
> 
>     Fascinating --- the gcd approach was pretty bad in 32 bit land.
>     However, in 64 bits, the gcd batches are large enough to amortize the
>     cost, and that detects most composites without sending sqrtFloor.  The
>     small integer threshold is now 91 squared.
> 
>     On 10/10/19 20:37, Agustín Sansone via Cuis-dev wrote:
>      >     Well, what do you think?  Are we done going over this poor
>     method?
>      >
>      >
>      > Okay, I'm happy with this version.
>      >
>     -- 
>     Cuis-dev mailing list
>     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>     https://lists.cuis.st/mailman/listinfo/cuis-dev
> 


More information about the Cuis-dev mailing list