geodynamics/burnman — pull request #38 by ian-r-rose (2014-10-22 20:57:01+00:00)
Title: Test for numba performance improvements

Hi all,

Doing some procrastination this afternoon, I thought I'd take a look at the numba package and how easy it is to use. If you have not heard of it, numba is an attempt to make a JIT (just in time compiler) for python with numpy support. In practice, this means that a lot of python code can be dramatically sped up.

To test this, I put a jit wrapper around the Debye function (some of the most time consuming code in burnman) and immediately saw a 2-4x speedup for code that evaluates the EoS a lot.

The downside of this is, of course, that it introduces an additional dependency in numba+llvm. In this branch I've set it up so that if numba is installed, it uses it, otherwise it falls back on the pure python approach.

Thoughts?
Ian