i made the test, here is what i can tell you from my experiments

1)  for a mapMatrix ( map<string, map<string, ex> > ) of 8524 x 8524 where all expression where 0, the RAM usage was 6GB ~ 18% of 32GB, very close to your stimation Alexei, you where right on that

2) however, if i repeat the experiment but let the expressions be what they should be (which are pretty large), then RAM usage goes beyond 32GB, i predict is something like 40GB of usage.

3) i would be complaining about the high ammount of RAM usage if it werent because of the following peculiarity. If instead of a mtrix, i decide to store the expresions in a system ecuation form with its corresponding variables (in the way that all elements of a row are grouped into one big polinomial expression), RAM usage is becomes low again!


2) and 3) have the same ammount of terms, just grouped in a different way, it is strange, i am gonna do some more tests and any news i will post back,

Alexei, what is your opinion on my experience?



On Fri, Oct 22, 2010 at 12:34 PM, Cristobal Navarro <axischire@gmail.com> wrote:
Alexei

thanks for helping, 

i am going to do something equivalent to what you suggested, i will fill all expresions of the mapMatrix with zeros, and see how much RAM i consume because of the strings.
ill post my results in a moment.
best regards
Cristobal


On Fri, Oct 22, 2010 at 9:53 AM, Alexei Sheplyakov <alexei.sheplyakov@gmail.com> wrote:
Hi again,

On Fri, Oct 22, 2010 at 12:22 AM, Cristobal Navarro <axischire@gmail.com> wrote:

> i kept investigating,
> based on the test i've made, im almost sure, 99%, that the increase in
> memory usage is due to the segmentation of the expressions.

I don't think the problem has anything to do with GiNaC. Hint: try sticking
ints (instead of ex*) into that map. Check the memory usage, and compare
it with your calculations.

Use a different data structure (perhaps hash map or a sorted array), and
store ex instead of pointers.

Best regards,
       Alexei
_______________________________________________
GiNaC-list mailing list
GiNaC-list@ginac.de
https://www.cebix.net/mailman/listinfo/ginac-list