We all are curious of how the new Python 3.11 version improves things compared to what we already have in Python 3.10. This snippet explores the performance capability of the new version in comparison with its predecessor 3.10.
Dario Radecic, who’s a Data Scientist and the CEO and founder at ‘Deep Data Digital’ recently published exciting news about the upcoming Python version 3.11.
While the new version of Python is set to be released by October this year, Dario explored the Release Candidate- RC version of Python 3.11 and compared the performance metrics with earlier Python 3.10 to see which one is faster.
It turned out that Python 3.11 achieves relatively faster performance with an average of 14% over its earlier version Python 3.10.
Performance Benchmark: 3.11 vs. 3.10
In a tentative attempt to compare the newly released Python 3.11 (RC version) with the existing Python 3.10, Dario specified certain settings to objectively measure results.
These included, installing two versions in separate Docker containers, a PC setup such as M1 Pro with a 10 core CPU (5 cores dedicated for each version), and using Pyperformance package was used to measure performance of each version.
Quick Tip: Docker is an essential tool for Data Science and Machine Learning applications that eases the code sharing across a wide range of systems. A Docker container offers an isolated environment for your applications that would otherwise not run on other systems with different operating systems.
After arranging the experimental setup, Dario ran a number of benchmark tests to find out the accuracy for each version. The results showed that overall, Python 3.11 is 14% more efficient than its predecessor Python 3.10.
Moreover, considering each test separately, for a number of tests, the new version came out to be 64% faster while on others it performed slower. The details of the tests are as follows.
Python for Data Science
Python is a powerful programming language that enables advanced, scalable, automated, and efficient data science functions. These functions include, data wrangling, data visualization, and machine learning tasks.Â
With new work on improving the speed of Python processing, these steps are critical in enhancing development of data science applications where performance on huge datasets matters.Â
We look forward to seeing more work in making Python the fastest programming language on Earth.
Happy Coding!