0

Pumped-up performance Python with Pyston

Pumped-up performance Python with Pyston

Python developers can look forward to faster implementations with the release of Pyston v2.2, while Facebook is developing its own internal implementation called Cinder from which it aims to upstream improvements to CPython.

👉Hướng dẫn lập trình Python – Python Guide

Pyston is one such project, and the just released version 2.2 is claimed to be 30 percent faster than standard Python in the Pyston team’s own web server benchmarks. Pyston is a fork of CPython, and the foundational technology powering Pyston v2.2 is the same as that found in earlier versions, but the project team says it has tuned and optimised more areas and found additional ways to boost performance, particularly in the JIT and attribute cache mechanisms.

One of the ways the team found to squeeze out a bit of extra performance is by removing many of the rarely-used debugging features that Python supports, because they are expensive (i.e. time consuming) when not needed. Doing just this has resulted in a two percent speedup. Developers who want debugging features can apparently still use the “debug build” of stock Python, because of the compatibility between the two.

Pumped-up performance Python with Pyston

The Pyston project has had a shaky start, with development hitting a hiatus after Dropbox pulled its sponsorship back in 2017. Now the feedback from potential customers has convinced the project team that Pyston can thrive on an open-source business model, and so the code for Pyston v2.2 is available on GitHub.

Python with Pyston v2.2: faster and open source

pyston logo

Pyston’s developers are proud to announce Pyston v2.2, the latest version of our faster implementation of the Python programming language. This version is significantly faster than previous ones, and importantly is now open source.

They also merged in many changes from CPython and are now based on CPython 3.8.8.

Pyston v2.2: Performance

Pyston v2.2 is 30% faster than stock Python on our web server benchmarks. This is a significant improvement over our previous performance, and if we were feeling cheeky, we would advertise it as “50% more speedup.”

The foundational technology powering Pyston v2.2 is the same as that found in earlier versions, but we have tuned and optimized more areas and found additional speedups, particularly in our JIT and attribute cache mechanisms.

One noteworthy change is that we decided to remove many of the rarely-used debugging features that Python supports because they are expensive even when not needed. Doing so collectively resulted in a 2% speedup, which was remarkable to us: of all the computers in the world running Python, 2% of them are executing debugging checks. We’ve disabled those checks and are positioning ourselves as an “optimized build” similar to binaries without debugging information. Those who still want debugging features can use the “debug build” of stock Python because they are interchangeable. For a full list of the features we removed in Pyston v2.2, please see our wiki.

Pyston v2.2: Open source

As we’ve continued talking to potential customers we now feel convinced that Pyston can thrive on an open-source business model, primarily by starting with support services. This means that we’ve open sourced Pyston v2.2, which you can find at our GitHub here.

We’ve archived our old repository to reduce confusion, but you can still find that here.

We are looking into which of our newest changes can be upstreamed to CPython. Throughout this process, we welcome your contributions. Help with getting Pyston packaged for additional platforms would be especially useful.

Pyston v2.2: Moving forward

We continue to try and make Pyston as compelling and easy to use as possible. Working Pyston into your projects should be as easy as replacing “python” with “pyston.” If that’s not the case, we’d love to hear about it on our GitHub issues tracker or on our Discord channel. We hope you’ll give Pyston a try and see that it really is the easiest way to speed up your Python code.

hocbaicungcon

Leave a Reply

Your email address will not be published. Required fields are marked *