Numba quick test https://numba.pydata.org/ https://pypi.org/project/numba/ https://github.com/numba/numba https://numba.readthedocs.io/en/stable/index.html Example speedup results: >python mandel_without_numba.py Took 15812.797070 ms >python mandel_with_numba.py Took 1310.543776 ms