Faster Python - Tips & Tricks
By David Ziganto • July 14, 2017
There is a plethora of information about how to speed up Python code. Some strategies revolve around leveraging libraries like Cython, whereas others propose a “do this, not that” coding approach. There exist many “do this, not that” strategies but I decided to focus on just a few.
This post is split into two parts. In Part 1, I will compare two approaches commensurate with the “do this, not that” logic to see if there is a substantial difference and, if so, which approach is better. In Part 2, I will compare Python 2 and Python 3 to see if there is credence to the claim that Python 3 is indeed faster.