convert mpf t to double with rounding-modes defined by ieee754

usenett@gmx.de usenett at gmx.de
Mon Aug 1 18:43:35 CEST 2005


>> I tested my computation throughout with GMP and as well with MPFR. Working
>> with a large accumulator (in my case a variable with precision of 4288
>> bits), in which perhaps only some few limbs are used, the mpfr-version is
>> about a factor of 4-5 slower. That has neither anything to do, that the mpfr
>> authors are 'some random web/VB code monkeys', nor that 'C++ is slow'. The
>> mpfr-library just doesn't fit to my  problem. The way some things are
>> realized in gmp seem to be more profitable to me (just in my case, not
>> generally).

PP>  Which functions did you use?
PP>  What do you mean by "MPFR doesn't fit my problem"?
 
PP>  In my own benchs, MPFR is as fast as MPF. It evens beat MPF in some.

I generate three mpf(r)_t variables, do some 'random' operations on them and
read out the interval time counter of my Itanium2. Then I compare the average
computation time for the three blocks: initializations, set doubles and the
multiplications/additions.

The initialization is quite identically fast (about 727 clocks), the setting
of the double-values is about 94 (mpfr) to 1059 (gmp) clocks and the
operations about 1430 to 5600.

In the attachment there is an extract of my sourcecode.

Greets, Heinz



More information about the gmp-discuss mailing list