Making Python Programs Blazingly Fast
The title is bad; the article doesn't deliver on the promise of making Python programs "blazingly" fast.<p>The first example given (the exponential function) is basically the worst scenario, because it's a purely numerical computation expressed in pure Python code. Whereas Python's performance is okay-ish for I/O or calling C modules.<p>From doing Project Euler solutions, I have ample evidence that for pure numerics (e.g. int, float, array), Java is anywhere from 10× to 30× faster than pure Python code executed in CPython. <a href="https://www.nayuki.io/page/project-euler-solutions#benchmark-timings" rel="nofollow">https://www.nayuki.io/page/project-euler-solutions#benchmark...</a><p>I believe it is basically impossible for Python to win back all that performance loss without adopting radical and jarring features like static typing, machine-sized integers, and no more "every number is a full-fledged object".