gmp binary file

Marc Glisse marc.glisse at
Sun Oct 11 20:58:13 CEST 2009

On Sun, 11 Oct 2009, Christ Schlacta wrote:

> is it possible to store mpzclass in a binary file for faster writing and 
> loading, or is that simply not an option?  I'm working with a somewhat 
> gmp-io-bound app, and faster read/write would rock.

Do you mean faster than the formatted I/O? mpz_class is a simple wrapper 
to the C type mpz_t, so you can use the C I/O functions on 
number.get_mpz_t(). See for instance:

Marc Glisse

More information about the gmp-discuss mailing list