[GiNaC-list] little optimization => lots of Memory usage

Cristobal Navarro axischire at gmail.com
Fri Oct 22 17:34:15 CEST 2010


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 at gmail.com> wrote:

> Hi again,
>
> On Fri, Oct 22, 2010 at 12:22 AM, Cristobal Navarro <axischire at 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 at ginac.de
> https://www.cebix.net/mailman/listinfo/ginac-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cebix.net/pipermail/ginac-list/attachments/20101022/06d75771/attachment.html>


More information about the GiNaC-list mailing list