Pypy and Pyston can Easily Outperform Python 3.11! Try it now

Pypy and Pyston can Easily Outperform Python 3.11! Try it now
Published on

Python 3.11 is believed to be the fastest programming language out there, but not anymore!

Python is incredibly popular because it's easy to learn, versatile, and has thousands of useful libraries for data science. But one thing, it is not as fast. That's about to change in Python 3.11, currently in the first beta phase of its preview (version 3.11.0b1) ahead of its stable release later this year. It is one of the most keenly anticipated versions. "Python 3.11 is up to 10-60 percent faster than Python 3.10," stated the release notes.

PyPy

Python has earned a reputation for being powerful, flexible, and easy to work with. These virtues have led to its use in a huge and growing variety of applications, workflows, and fields. However, wouldn't it be great if we could just take an existing Python program as is, and run it dramatically faster? That's exactly what PyPy allows you to do. PyPy uses optimization techniques found in other just-in-time compilers for dynamic languages. It analyzes running Python programs to determine the type information of objects as they're created and used in programs, then uses that type information as a guide to speed things up. For instance, if a Python function works with only one or two different object types, PyPy generates machine code to handle those specific cases.

Pyston

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 is an open-source faster implementation of the Python programming language, designed for the performance and compatibility challenges of large real-world applications. 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.​

Python, PyPy, and Pyston

There was much interest in the recent Python 3.11 beta benchmarks showing much performance uplift from this in-development version of Python compared to prior 3. x releases. While Python 3.11 performance is looking great and has huge advantages compared to prior versions, there are also alternative Python implementations like PyPy and Pyston. Stemming from Phoronix reader requests, here are benchmarks showing how Python 3.11 beta performance compares to those alternative Python implementations.

The Python language specification is used in a number of implementations such as CPython (written in C), Jython (written in Java), IronPython (written for . NET), and PyPy (written in Python).

CPython is the original implementation of Python and is by far the most popular and most maintained. When people refer to Python, they more often than not mean CPython. You're probably using CPython right now!

However, because it's a high-level interpreted language, CPython has certain limitations and won't win any medals for speed. That's where PyPy can come in handy. Since it adheres to the Python language specification, PyPy requires no change in your codebase and can offer significant speed improvements.

Now, you may be wondering why CPython doesn't implement PyPy's awesome features if they use the same syntax. The reason is that implementing those features would require huge changes to the source code and would be a major undertaking.

More Trending Stories 

Join our WhatsApp Channel to get the latest news, exclusives and videos on WhatsApp

                                                                                                       _____________                                             

Disclaimer: Analytics Insight does not provide financial advice or guidance. Also note that the cryptocurrencies mentioned/listed on the website could potentially be scams, i.e. designed to induce you to invest financial resources that may be lost forever and not be recoverable once investments are made. You are responsible for conducting your own research (DYOR) before making any investments. Read more here.

Related Stories

No stories found.
logo
Analytics Insight
www.analyticsinsight.net