We’re very excited to release Pyston v2, a faster and highly compatible implementation of the Python programming language. Version 2 is 20% faster than stock Python 3.8 on our macrobenchmarks. More importantly, it is likely to be faster on your code. Pyston v2 can reduce server costs, reduce user latencies, and improve developer productivity.
Pyston v2 is easy to deploy, so if you’re looking for better Python performance, we encourage you to take five minutes and try Pyston. Doing so is one of the easiest ways to speed up your project.
Pyston v2 provides a noticeable speedup on many workloads while having few drawbacks. Our focus has been on web serving workloads, but Pyston v2 is also faster on other workloads and popular benchmarks.
Our team put together a new public Python macrobenchmark suite that measures the performance of several commonly-used Python projects. The benchmarks in this suite are larger than those found in other Python suites, making them more likely to be representative of real-world applications. Even though this gives us a lower headline number than other projects, we believe it translates to better speedups for real use cases. Pyston v2 still shows sped-up performance on microbenchmarks, being twice as fast as standard Python on tests like chaos.py and nbody.py.
Here are our performance results:
|CPython 3.8.5||Pyston 2.0||PyPy 7.3.2|
|flaskblogging warmup time ||n/a||n/a||85s|
|flaskblogging mean latency||5.1ms||4.1ms||2.5ms|
|flaskblogging p99 latency||6.3ms||5.2ms||5.8ms|
|flaskblogging memory usage||47MB||54MB||228MB|
|djangocms warmup time ||n/a||n/a||105s|
|djangocms mean latency||14.1ms||11.8ms||15.9ms|
|djangocms p99 latency||15.0ms||12.8ms||179ms|
|djangocms memory usage||84MB||91MB||279MB|
|mypy performance||1x||1.07x ||unsupported|
|pytorch performance||1x||1.00x ||unsupported|
|pypy benchmark suite ||1x||1.36x||2.48x|
 Warmup time is defined as time until the benchmark reached 95% of peak performance; if it was not distinguishable from noise it is marked “n/a”. Only post-warmup behavior is considered for latency measurement. mypy and PyTorch don’t support automatically building their C extensions from source, so these Pyston numbers use our unsafe compatibility mode
 The PyPy benchmark suite was modified to only run the benchmarks that are compatible with Python 3.8