Table of Contents
PyPy is an alternative implementation of Python. Its just-in-time (JIT) compiler can speed up frequently executed Python code while a program runs. It is worth testing for a long-running, CPU-bound program that spends much of its time in Python. Short commands, I/O-bound jobs, and workloads dominated by native libraries can behave differently.

How PyPy differs from CPython
PyPy implements a version of the Python language, and CPython is the implementation distributed by Python.org. PyPy’s JIT identifies frequently executed paths and compiles them while the program runs. That takes time to warm up. PyPy supports many packages, but some compiled extensions require a compatible build, and extensions written for CPython may behave or perform differently. See PyPy’s compatibility notes.

PyPy project website. Image credit: PyPy.
Try PyPy without replacing your Python installation
- Download a stable build for your operating system and architecture from the official PyPy downloads. Check which Python language version the build supports.
- Extract it and run the executable in the archive. On a shell where the executable is named
pypy3and is on your path, runpypy3 --version. - Use a separate environment for your project’s dependencies. Install the packages and run the same tests under PyPy and CPython before timing either. Follow the PyPy installation guide for platform and packaging options.
Benchmark the workload you actually run
Use the same input and dependency versions under both interpreters. For a short CLI command, measure total runtime from process start. For a persistent worker, also measure throughput after warm-up. Confirm both produce the same result and compare memory use when it matters. A tight loop can reveal a JIT effect, but it does not predict the speed of an application waiting on storage or a network.
Historical benchmark screenshots


If you are new to the language and its tooling, start with the Python fundamentals course.
Reader Comments 0
Sign in with email or Google to join the discussion.