The way how I create my mpf_class effects the result after a arithmetic operation

Torbjörn Granlund tg at gmplib.org
Thu Jan 29 10:07:56 UTC 2015


Hans Aberg <haberg-1 at telia.com> writes:

  > Has it a better performance? Is it better for lower
  > precisions?
  
  Builtin types, i.e., with hardware support, generally are much faster,
  and for speed, one should avoid overflow checks if possible. Dynamic
  allocations are generally slow; one may speed up by using static
  arrays, or a GC.
  
  Also, the FPU may be optimized around the 64-bit double type (at least
  in the the past), shorter float type computation done by converting
  back and forth to a double.
  
GMP doesn;t use the FPU for the assignment operations from IEEE floats,
so while the reasoning above might be interesting, it is not relevant in
the context of the question posed.

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-discuss mailing list