5 min
If you are a programmer who uses Python to code every day, you might be using CPython, Cython, Jython, etc. as an interpreter. The PyPy team has released a new version, 7.1.0 which can be used as an alternative for CPython interpreter. The information on this article has been cited from the original documentation and the sources are also cited inside.
CPython or C-Extensions for Python is an optimising static compiler which provides the highest level of compatibility with Python packages as well as C extension modules. It helps you to write Python code that calls back and forth from and to C or C++ code natively at any point.
The PyPy team aims to provide a compliant, flexible and fast implementation of Python language which uses the RPython toolchain to enable new advanced high-level features without having to encode the low-level details. The main motivation for developing the translation framework is to provide a full-featured, customisable, fast and very compliant Python implementation, working on and interacting with a large variety of platforms and allowing the quick introduction of new advanced language features.
Features Of PyPy
- Speed: The main executable comes with a Just-in-Time (JIT) compiler which makes it really fast in running most benchmarks. PyPy works best when executing long-running programs where a significant fraction of the time is spent executing Python code. This is the case covered by the majority of the benchmarks, but not all of them – the goal of PyPy is to get speed but still support (ideally) any Python program.
- Memory Usage: Memory-hungry Python programs (several hundreds of MBs or more) might end up taking less space than they do in CPython.
- Stackless: PyPy can expose to its user language features similar to the ones present in Stackless Python: the ability to write code in a massively concurrent style.
- Sandboxing: PyPy's sandboxing is a working prototype for the idea of running untrusted user programs. Unlike other sandboxing approaches for Python, PyPy's does not try to limit language features considered “unsafe”.
- x86 machines on most common operating systems (Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD)
- big- and little-endian variants of PPC64 running Linux,
- s390x running Linux
- As mentioned earlier, it includes two different interpreters PyPy 2.7 and PyPy 3.6
- Merges with UTF-8 to give a nice speed bump
- The ability to use the buffer protocol is improved with ctype structures and arrays
- The CFFI backend has been updated to version 1.12.2
- Improve register allocation in the JIT by using better heuristics
- Correctly initialized the d_type and d_name members of built-in descriptors to fix a segfault related to class methods in Cython
- Added copying to zlib
Bottom Line
PyPy has been claiming that it is faster than CPython and there has always been the controversy of using PyPy over CPython. Speed has always been one of the major factors for programmers. PyPy undoubtedly runs faster on some CPU-heavy workloads but sometimes it lacks to work not so faster for Python scripts. By overcoming all the challenges in PyPy, it can certainly become the faster interpreter. PyPy 7.1.0 is available to download from here.- The AI Slowdown Narrative Doesn’t Reflect Enterprise Reality
- India’s Enterprises are Scaling AI. Is the Infrastructure Ready?
- Industry Wants Faster Approvals and Cheaper Power in India’s Data Centre Policy
- Inside Jio Platforms: Its Tech Bets, Loss-Making Subsidiaries and Hidden Risks
- India’s GCCs to Add 1.4 Million Jobs, Drive 170 Million Sq. Ft. Office Demand by 2031
- AI Can Be Cyborg or Centaur. But Can Enterprises Monetise It?

