I am writting this entrance because I would like you to comment that there is alternative distributions of Python I didn’t know why they exists, but after I watched a video on YouTube called High Performance Python (you have all source code available here on GitHub), I understood it.
Running the same function can vary in speed 200-300 times if the code is optimized for an alternative Python distribution. Here you can download all of them (the official ones!) https://www.python.org/download/alternatives/.
On previous post, I already wrote about two of them: Anaconda, y Python Portable, but there are more! The first is prepared for data analyst, and the second is a version to “live” in your USB memory.
The video is long, about 3 hours, and you can see an algorithm implementation that takes 240 seconds using Python, but if you use PyPy, the total time is under 90 seconds (the same task and “almost” the same code), less time if you try on Cython, and only 20 seconds if you use multiplocessing and complied C code. Incredible isn’t it?
Another good reason to watch the video is several tools showed to work with Python. The one I like the most was RunSnakeRun a profiler tool to understand how your code works!
To end with, if you have a process to run where time speed is critical, you should try an alternative Python version.
I haven’t tried (until now) anything of the video, but I will!