I don't think I'll ever stop being impressed at just how heavy duty
numba
is for
ridiculously lightweight syntax. 27 mins -> 2.7 seconds with 1 import and a decorator (and, ok, a slight refactoring in the bottom half of the answer to cache intermediate calculations).