DEV Community

Cover image for What Is Pyston - Is It 30% Faster Than Python?
Kat Holder
Kat Holder

Posted on

What Is Pyston - Is It 30% Faster Than Python?

Who doesn't want to speed up their operations? There have been complaints regarding the general-purpose coding language Python that it is too slow. The use of Python is prevalent in applications like machine learning and data science projects. However, its performance has received criticism. Some languages and runtimes can produce code hastily, but they are not easy to be productive.

With a bunch of issues being faced in usage, there is a real need for faster execution. Moreover, to address this issue Kevin Modzelewski assisted to make the Pyston interpreter entirely centered on speeding up Python code. Pyston project came due to bad performance in the implementation of code faced by the developers. Pyston developers have launched the 2.2 version of their runtime.

What is Pyston?

Highly speed-centric Pyston is an adaptation of the famous programming language Python. It employs just-in-time compilation and fewer other techniques to speed up the operations. There is a new feature of full source code in it. You can find below the original licensing of Python as an open-source project.

What is Pyston's purpose?

It has a dual objective.

  1. It produces a drop-in exchange for the standard Python run-time. Basically, it can speed up the already existing Python deployments with the least effort.
  2. Any innovation in Pyston is to be upstreamed back into Python only if the team of Python wishes.


The 2.2 version of Pyston is 30% faster than Python on the web browser benchmarks. Pyston has a similar foundational technology that was in earlier versions. However, there is more optimization in few areas with extra speedups in just-in-time and attribute cache mechanisms.

Rarely-used debugging features removed

Developers have now removed several less-used debugging features on a huge scale. The implementation process is slowed down by these features, even when they are not in use. Now, the developers gained a 2% improvement in performance. It is remarkable for the developers that all the systems across the world running Python currently, 2% are performing the debugging checks.

The entire team has removed a specific feature that some users may still require. So, the Pyston developers have positioned the implementation as an "optimized build." If someone needs the debugging features, they can use the debug build of the standard Python implementation.

Easy usage

The developers of Pyston have worked hard on making the implementation less painless to use as possible. The main purpose is, Python can be used by easily typing "Pyston" instead of "Python."

Pyston project

The start of the Pyston project was unstable, with its development hitting a break after Dropbox drew its sponsorship back in 2017. A bunch of feedback from the potential customer has now convinced the team that Pyston can grow on an open-source business model. The code for Pyston version 2.2 is now available on GitHub.

In the meantime, the Facebook Incubator page on GitHub has recently launched a new project titled Cinder. Being described as Instagram's internal performance-oriented production version of CPython 3.8. The main purpose is to upstream any modifications that speed up the performance back to CPython.

So, the Cinder project team has suggested that while they are operating Cinder in production, they are not giving any support for the user running it externally. However, it's publicly available for anyone to try and download and recommend improvements.

There are several performance optimizations in Cinder. These include Bytecode inline caching, an experimental bytecode compiler, eager evaluation of coroutines. All these use some type annotations to release type-specialized Bytecode performing better in JIT.

Summing Up

Efforts are made to make Pyston more compelling and easy to use for the users. The maker of Python mainly focused on machine learning and artificial intelligence development with the NumPy (Python Libraries ). He operates the same for-profit work by launching an open-source version of its Python division and its versions. Kevin Modzelewski wanted to make Pyston more profitable through open-source, beginning with support services. Modzelewski considers it should be easy for the developers to exchange existing Python code for Pyston. He stated, "Working Pyston in your projects should be as simple as substituting''Python” with ''Pyston."

Top comments (0)