Skip to main content

Introduction to PyPy

PyPy is a Python interpreter written in Python. It claims to be faster than CPython for certain benchmark tests.

The default python is normally slow as it complies into bytecode, to fill this gap,PyPy is used.

PyPy was conceived to be an implementation of Python . It is written in a programming language that is similar to Python. This makes it easy to identify areas where it can be improved and makes PyPy more flexible and easier to experiment with than CPython.

Its uses optimization techniques found in other just-in-time compilers for dynamic languages. It analyze 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. 

It aims to provide a common translation and support framework for producing implementations of dynamic languages, emphasizing a clean separation between language specification and implementation aspects. It also aims to provide a compliant, flexible and fast implementation of the Python programming language using the above framework to enable new advanced features without having to encode low level details into it.

The interpreter is written in RPython(Restricted Python-a subset of Python).

It uses a technique known as meta-tracing, which transforms an interpreter into a tracing just-in-time compiler. Since interpreters are usually easier to write than compilers, but run slower, this technique can make it easier to produce efficient implementations of programming languages. PyPy's meta-tracing toolchain is called RPython.

Tags
Submitted by devanshi.srivastava on July 20, 2021

Devanshi, is working as a Data Scientist with iVagus. She has expertise in Python, NumPy, Pandas and other data science technologies.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.