This may get more attention on Code Review. But check for relevant tags and requirements (full running code etc). I usually don't recommend CR, but you seem to have used the speedups most recommended on SO, such as
numba
. So it may come down to coding details and organization, the kind of thing that CR answers seem to focus on. —
hpaulj 33 secs ago