mpf_get_str() is slow for big numbers?

rob shaw rob at
Sat Nov 22 13:21:37 CET 2003


The installation of GMP went smoothly on a mac G4 under OS X, but I've
noticed that
the output of very large numbers via mpf_out_str() is painfully slow.  As a
I computed sqrt(2) to 100 million digits, which took 3 minutes, but writing
to disk
took something over 15 hours!  This should be fast, if the number base is a
power of 2.
In looking at the source, the probelm seems to be in mpf_get_str(), and in
that function,
there's a comment about special code for powers of 2, but it doesn't seem
to be implemented.
Before I try and learn enough internals to fix this, I'm wondering if I'm
missing something.

      Rob Shaw

More information about the gmp-discuss mailing list