I used numba to accelerate parts of my Python code using the autojit decorator. Tests pass and %timeit shows that the code is indeed accelerated.
The first execution is slow because, I assume, numba is compiling the code. Makes sense. But when I run a suite of tests, they run extremely slowly, from 10 tests in about 10 seconds before my changes to the same tests in 117 seconds. It seems like numba must be compiling again and again, separately for each test.
Can I avoid this? I have tried running one simple test in the setUp
function, thinking that might compile the function there once for all the tests, but this did not change the run time significantly.