_mp_alloc vs ALLOC
Torbjorn Granlund
tg at gmplib.org
Wed Feb 22 21:24:06 CET 2012
Marc Glisse <marc.glisse at inria.fr> writes:
That's for the alloca case. Without alloca, one call to malloc is
better than two (although that usually also means the numbers are big
and any gmp operation will dwarf allocation). Also, the threshold
between alloca and malloc is quite high, and with many separate
allocations that all barely fit below this threshold, the total amount
of stack memory used can become too large for some applications
(lowering the threshold may be easier than allocating things in groups
though).
I don't buy this argument.
If the threshold is high, then surely the malloc time will not take a
significant fraction of the total time.
If the threshold is too high, then we should lower it.
Is there no good range for the threshold? Show me the numbers...!
--
Torbjörn
More information about the gmp-devel
mailing list