QuantEcon/QuantEcon.py — pull request #103 by oyamad (2014-11-28 14:28:01+00:00)
Title: GTH_SOLVE: Numba version

This is to open a discussion on the trade-off between speed and simplicity/clarity of the code, with a concrete example with `gth_solve` where I replaced the current, Numpy-based vectorized version with a Numba version.

* The routine is divided into the wrapper part and the jit-compiled part `_gth_solve_jit`.
* Matrix operations are replaced with many for loops in `_gth_solve_jit`, while the code there is now almost the same as the Julia version.
* The Numba version is 3x-30x faster than the Numpy version: see the performance comparison [here](https://github.com/oyamad/gth_solve_numba).
(The option `overwrite` has been dropped as it did not contribute much to speed-up.)

You guys have already had a discussion on the trade-off before #36. What degree of speed-up justifies the use of Numba? Any thoughts on this particular case?