mini-gmp and mpq

Torbjörn Granlund tg at
Tue Feb 27 11:08:33 UTC 2018

Bradley Lucier <lucier at> writes:

  At the time (2003), Mzscheme used mini-gmp for integer arithmetic, and

That's what I'd call an early adopter since mini-gmp was conceived only
in 2014.  ;-)

  its own rational number routines were written roughly along the lines
  of those proposed here, and Gambit used the algorithms from Knuth.
  The timings were


  > (time (fib 1000))
  cpu time: 379490 real time: 454623 gc time: 450


  (time (fib 1000))
      8 ms real time
      10 ms cpu time (10 user, 0 system)

  So these numbers weren't really that big (about 700 bits in numerator
  and denominator) and there was about a factor of 40,000 difference in

Whatever arithmetic-over-Q routines these programs use, that sounds like
a lot.

Sure both measurements are in milliseconds?

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list