Another performance question

Michel Bardiaux mbardiaux at peaktime.be
Fri Apr 30 10:42:35 CEST 2004


I am using mpq's to represent time values with arbitrary precision so 
that arithmetic is lossless (e.g. in MPEG video files, one has to add 
1/90000 of second; in audio, 1/44100 is common).

I end up with a vast majority of numbers with very small limb sets, so 
that the malloc/free overhead dominates. What would be the impact, 
risks, etc of having flags (1 in mpz, 2 in mpq) telling that a limb is 
*not* a pointer but a number making by itself a 1-integer limb?

Note well, I am not asking that somebody else do it. If it seems 
possible, I might have a go, but I would prefer to be flamed before than 
after having done the work!

HaND,
-- 
Michel Bardiaux
Peaktime Belgium S.A.  Bd. du Souverain, 191  B-1160 Bruxelles
Tel : +32 2 790.29.41




More information about the gmp-discuss mailing list