On 06/07/2013 06:02 PM, Mikael wrote:

Was your Gambit pi-calculator compiled with (declare (not safe)) and any other related setting for optimizing speed, like increasing inlining, setting mostly generic and inlining standard and extended bindings, and executed with a minimum heap size of at least ~6MB?

The pi-calculator itself was interpreted; nearly all the work is done in the Gambit runtime library.  I suppose compiling it did speed it up a bit:

heine:~/programs/gambiteer/gambit> gsi chud1
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10, CPU time: 0..
Last 5 digits 26535.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100, CPU time: 0..
Last 5 digits 70679.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000, CPU time: 0..
Last 5 digits 1989.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000, CPU time: .024.
Last 5 digits 75678.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000, CPU time: .43200000000000005.
Last 5 digits 24646.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 6.151999999999999.
Last 5 digits 58151.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000000, CPU time: 95.432.



What's the scope of use of GMP in Python and in a hypothetical Gambit GMP support patch, only integer bignums?

I don't know.



If you have any thought on this feel free to share.


In all cases it's awesome that Gambit bundles its own bignum logics as by that Gambit is without any dependency requirement and thus makes Gambit completely portable and self-sustaining.

Best regards,
Mikael

2013/6/7 Bradley Lucier <lucier@math.purdue.edu>

heine:~/programs/gambiteer/gambit> gsi chud1.scm
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10, CPU time: 0..
Last 5 digits 26535.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100, CPU time: 0..
Last 5 digits 70679.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000, CPU time: .004.
Last 5 digits 1989.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000, CPU time: .028.
Last 5 digits 75678.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 100000, CPU time: .472.
Last 5 digits 24646.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 1000000, CPU time: 6.448.
Last 5 digits 58151.
Chudnovsky's algorithm using binary splitting in Gambit Scheme: digits 10000000, CPU time: 98.612.
Last 5 digits 55897.