st: combinatorics

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, ...