6.0.0 crash at high precision mul?

Torbjörn Granlund tg at gmplib.org
Thu Jun 5 12:38:59 UTC 2014

Marc Glisse <marc.glisse at inria.fr> writes:

  Some GMP functions do 10 allocations, can be called recursively, call
  other functions that do allocations, etc. With a 512kB stack (or even
  1MB) it goes quite quickly...
Are you aware of some place where the "recursive allocation" is not
substantially smaller than the immediately preceding allocation and the
recursion depth is \omega(log n)?

  Is there a measurable performance difference if we divide 65536 by 4?
I cannot tell, and an analysis of this is non-trivial.

  I think it was Marco who wanted to generalize the use of
  TMP_ALLOC_LIMBS_2 recently, that could help as well.

Functions that make many TMP_ALLOC with unbounded argument should
perhaps be changed to use one TMP_ALLOC (or if the total allocation is
known to be over some limit and if the time complexity of the function
is super-linear they can as well use TMP_BALLOC).

Please encrypt, key id 0xC8601622

More information about the gmp-discuss mailing list