statsmodels/statsmodels — pull request #1524 by jseabold (2014-03-27 20:25:12+00:00)
Title: ENH: Optimize Cython code. Use scipy blas function pointers.

Didn't have to change any of the build setup which is nice. Tested building on windows for Python 2.7 32- and 64-bit without problems.

The old mailing list example from 9/13 is now 10-30x faster.

Since the `Z` matrix in the univariate ARMA case is always [[1, 0, ..., 0]]. We now avoid writing general KF code and just use slicing to select what we want.

There's probably a bit more performance that can be squeezed out here. We can us PyArray_DATA rather than memoryviews for the arrays that don't need to be sliced often. There are also still a few cases where we use `dgemm` when we don't need to. E.g., we're taking the outer product of two `r x 1` vectors, but I left these as `dgemm`. The initial variance estimation is also still pure Python because I didn't want to rewrite it. This might gain us the most, but it's only called once per hit. There might also be some more ways to avoid the temporary arrays, but my thinking in BLAS linear algebra needs some work.

Need to add a note to the release about this.