Optimisation
Numba is a widely used optimisation library for Python that elevates function execution times into the same ballpark as the C language, and C is undoubtedly rapid.
Is that level of optimisation enough to compete with a newer, purpose built, targeted language like Julia? And if so, are there any caveats to achieving that level of execution speed in Python?
I have previously written an article comparing NumPy to Julia. The outcome was essentially that Julia is indeed faster than NumPy, in general. However, it is a bit more nuanced than that, so I encourage you to check out the article to get the whole story:
One of the most common responses to that article was something along the lines of:
Well you should also use Numba. It is simple to implement, and makes things even faster!
-quite a few people
…so this article is going to attempt to address that suggestion head on.
Does using Numba match, or even exceed, the speed of Julia? Is it as easy to use and implement as people seem to claim? And, are there any downsides?
Let’s find out…
As some of you may not have read the previous article about NumPy, I will repeat the “What is Julia?” section included in that article here, but feel free to skip ahead if you have already read the previous article.