Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Mata use of memory for data -- duplicate memory allocation, multiple copies?


From   László Sándor <[email protected]>
To   [email protected]
Subject   Re: st: Mata use of memory for data -- duplicate memory allocation, multiple copies?
Date   Tue, 17 Sep 2013 11:26:54 -0400

For the record: StataCorp replied that functions that won't take views
are flagged as such in the documentation. The rest would take them
without making copies, including user-defined ones taking real
matrices.

On operations, the transpose seem to be real culprit, not all
operators make a copy to complete, though I have not received an
extensive list. But multiplications are OK, for instance.

On Thu, Sep 12, 2013 at 11:18 AM, László Sándor <[email protected]> wrote:
> I am trying to formulate my previous concerns into a more fruitful
> discussion for all here. Maybe distinguished Statalist members with
> Mata coding experience could share their experiences.
>
> I think my biggest question is that if it is this hard to use st_views
> without making a copy of the data in anything apart from the cross()
> function, does it go without saying that all programs written in Mata
> will take memory on the order of magnitude of the data you use? This
> not only depletes system resources but also take plenty of copying,
> e.g. if the copy is made again and again for all iterations of an
> estimator.
>
> If this is the case, I wonder why I found no more prominent resources
> about the issue. Maybe even Bill could have mentioned this in the
> Missing Manual and blogposts, or Kit in ITSP.
>
> Also, this sheds new light on the StataCorp hardware recommendation
> that generally you want to have 50% more RAM than the largest data you
> would ever use.
>
> If I am missing something here, I am happy to learn!
>
> Thanks again,
>
> Laszlo
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index