Benchmarking The Python Optimizations Of Clear Linux Against Ubuntu, Intel Python
Stemming from Clear Linux detailing how they optimize Python's performance using various techniques, there's been reader interest in seeing just how their Python build stacks up. Here's a look at the Clear Linux Python performance compared to a few other configurations as well as Ubuntu Linux.
For this quick Python benchmarking roundabout, the following configurations were tested while using an Intel Core i9 7980XE system throughout:
- Clear Linux's default Python build with the performance optimizations they recently outlined to how they ship their Python binary.
- Still running Clear Linux, but building the upstream Python 3.7.2 release with no out-of-tree patches or special optimizations or any extra CFLAGS/CXXFLAGS (Clear's default flags were unset for this build) aside from building Python with its --enable-optimizations switch to produce a release build.
- While running Clear Linux still, next was testing Intel's proprietary Intel Distribution for Python 2019 Update 2.
- The system was then reloaded with Ubuntu 18.10 Linux and first up there was running the default Ubuntu Python 3 build to check out its stock performance.
All the system details:
And then these quick Python performance benchmarks:
With Numpy, Clear's Python build offered similar performance to the Intel Distribution for Python. Ubuntu's Python meanwhile was much slower than the Python implementations on Clear Linux.
In the case of the cython-bench test profile, Intel's Python build yielded significantly slower performance while Clear Linux's default Python was the fastest. The upstream Python 3.7.2 build on Clear Linux took 18% more time to run than the packaged Python. But significantly slower than both of those builds was the out-of-the-box Python performance on Ubuntu -- which took nearly twice as long to complete this Python benchmark.
With the very simple PyBench test profile, Clear Linux's default Python remained a great deal faster than the rest. Even the clean build of Python 3.7.4 atop Clear Linux was much faster than the Intel Python distribution or Ubuntu's Python binary.
SciKit-Learn was a magnitude faster on Clear Linux than with the Ubuntu Python build.
Those are the initial Python benchmarks spurred on by the blog post outlining their optimization strategy. There's certainly much potential for other Linux distributions to optimize their Python scripting performance. More tests with PyPy 7.0 and friends on the way.
For this quick Python benchmarking roundabout, the following configurations were tested while using an Intel Core i9 7980XE system throughout:
- Clear Linux's default Python build with the performance optimizations they recently outlined to how they ship their Python binary.
- Still running Clear Linux, but building the upstream Python 3.7.2 release with no out-of-tree patches or special optimizations or any extra CFLAGS/CXXFLAGS (Clear's default flags were unset for this build) aside from building Python with its --enable-optimizations switch to produce a release build.
- While running Clear Linux still, next was testing Intel's proprietary Intel Distribution for Python 2019 Update 2.
- The system was then reloaded with Ubuntu 18.10 Linux and first up there was running the default Ubuntu Python 3 build to check out its stock performance.
All the system details:
And then these quick Python performance benchmarks:
With Numpy, Clear's Python build offered similar performance to the Intel Distribution for Python. Ubuntu's Python meanwhile was much slower than the Python implementations on Clear Linux.
In the case of the cython-bench test profile, Intel's Python build yielded significantly slower performance while Clear Linux's default Python was the fastest. The upstream Python 3.7.2 build on Clear Linux took 18% more time to run than the packaged Python. But significantly slower than both of those builds was the out-of-the-box Python performance on Ubuntu -- which took nearly twice as long to complete this Python benchmark.
With the very simple PyBench test profile, Clear Linux's default Python remained a great deal faster than the rest. Even the clean build of Python 3.7.4 atop Clear Linux was much faster than the Intel Python distribution or Ubuntu's Python binary.
SciKit-Learn was a magnitude faster on Clear Linux than with the Ubuntu Python build.
Those are the initial Python benchmarks spurred on by the blog post outlining their optimization strategy. There's certainly much potential for other Linux distributions to optimize their Python scripting performance. More tests with PyPy 7.0 and friends on the way.
12 Comments