i made the test, here is what i can tell you from my experiments<div><br></div><div>1)  for a mapMatrix ( map&lt;string, map&lt;string, ex&gt; &gt; ) 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</div>

<div><br></div><div>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.</div><div><br>

</div><div>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!</div>

<div><br></div><div><br></div><div>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,</div><div><br></div><div>Alexei, what is your opinion on my experience?</div>

<div><br></div><div><br></div><div><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 12:34 PM, Cristobal Navarro <span dir="ltr">&lt;<a href="mailto:axischire@gmail.com">axischire@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Alexei<div><br></div><div>thanks for helping, </div><div><br></div><div>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.</div>


<div>ill post my results in a moment.</div><div>best regards</div><div>Cristobal<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 9:53 AM, Alexei Sheplyakov <span dir="ltr">&lt;<a href="mailto:alexei.sheplyakov@gmail.com" target="_blank">alexei.sheplyakov@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi again,<br>
<div><br>
On Fri, Oct 22, 2010 at 12:22 AM, Cristobal Navarro &lt;<a href="mailto:axischire@gmail.com" target="_blank">axischire@gmail.com</a>&gt; wrote:<br>
<br>
&gt; i kept investigating,<br>
&gt; based on the test i&#39;ve made, im almost sure, 99%, that the increase in<br>
&gt; memory usage is due to the segmentation of the expressions.<br>
<br>
</div>I don&#39;t think the problem has anything to do with GiNaC. Hint: try sticking<br>
ints (instead of ex*) into that map. Check the memory usage, and compare<br>
it with your calculations.<br>
<br>
Use a different data structure (perhaps hash map or a sorted array), and<br>
store ex instead of pointers.<br>
<br>
Best regards,<br>
<font color="#888888">        Alexei<br>
</font><div><div></div><div>_______________________________________________<br>
GiNaC-list mailing list<br>
<a href="mailto:GiNaC-list@ginac.de" target="_blank">GiNaC-list@ginac.de</a><br>
<a href="https://www.cebix.net/mailman/listinfo/ginac-list" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-list</a><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>