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: Why is Mata much slower than MATLAB at matrix inversion?


From   "David M. Drukker" <ddrukker@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Why is Mata much slower than MATLAB at matrix inversion?
Date   Fri, 20 Jul 2012 16:48:52 -0500 (CDT)

Patrick Roland <patrick.rolande@gmail.com> posted that the Mata function
-cholinv()- is slower than a Matlab function for large matrices.

Others have discussed some issues with Patrick's example. Despite these issues, we took Patrick's post seriously, looked at the code, and found something that could be sped up.

We will release a faster version of -cholinv()- in an upcoming executable
update.

Note that any speed difference related to -cholinv()- is only noticeable for large matrices. For small matrices, such as variance-covariance matrices for models with 100 or fewer parameters, the difference is much harder to find. For example, the computation takes about .001 seconds on my machine.

Best,
David
ddrukker@stata.com

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


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