Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: combinatorics


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: combinatorics
Date   Wed, 17 Aug 2005 09:06:23 -0400

James says

Mata sounds good (I wonder how it compares to an optimized C-based
plugin). The algorithm is loop-based, so compilation really helps for
anything big. Would be nice to be able to do permutations 20 choose 5
and get something back before the release of Stata 10.

Naturally compiled bytecode cannot be as fast as optimized C code, but as it has been described in this summer's Stata Users Group meetings... There is a huge gap between interpreted ado-language code speed and compiled C-code speed. Mata comes out far toward the C end of that gap. The usability of Mata for heavy-duty computations is evidenced by StataCorp writing something like xtmixed in Mata. The company is relying on Mata's speed, and from what Bill Gould says, its speed can be increased with additional work on the (already quite efficient) bytecode compiler.

Like any matrix language, your mileage will vary substantially if you take advantage of vectorizable computations. And the downside of C plugins is that few developers have access to the several platforms needed to make their C plugin truly cross-platform. StataCorp has done a nice job of making C plugin installation work well over the web (e.g., from SSC) but the dearth of C plugins is testament to (a) the difficulty of writing and debugging C code and (b) the hassle of providing a compiled plugin for Windows, Solaris, Mac OS X, Linux, HP- UX, ...

Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index