<!--
.. title: PyPy Binary Sizes over Time
.. slug: pypy-binary-sizes-over-time
.. date: 2025-02-13 16:57:07 UTC+02:00
.. tags: 
.. category: 
.. link: 
.. description: 
.. type: text
-->

We don't do this regularly or anything, but every couple of years I look at how
the PyPy binary sizes have developed in the meantime. Looks like an ok balance
between occasionally cleaning something up and thereby shrinking the binary;
and then slow growth or explicit time/binary-size-tradeoffs.

![plot showing how the PyPy binary went from 68 MiB in early 2020 to 61 MiB
today, with a few ups and downs in between. various points in time are
annotated with reasons for growth and shrinkage. the biggest shrinkage is:
2022-05-10 compact jitcode liveness info](/images/2025-pypy-sizes.png)

This is the size of PyPy 2.7, btw. I can't use the 3.x variant, because the
size of that changes due to newer Python versions implemented. Interestingly
enough PyPy 3.x is mostly smaller than 2.7. PyPy 3.11 is 58.8 MiB, despite
having a bunch more features. I never quite figure out why. Just for
comparison, CPython 3.11 is 25.2 MiB.

Here's a plot of CPython/PyPy 3.x binary sizes:

![CPython and PyPy binary sizes over time. CPython 3.7 is 35 MiB, shrinks to
22.5 MiB in 3.8, then slowly grows again until 3.11 at 25.2 MiB. Cpython 3.12
is much bigger, at 37.3 MiB.  CPy 3.13 shrinks a bit again to 36.1 MiB. PyPy
tracks the ups and downs in roughly the same shape but is generally much
bigger. 3.7 is at 60.5, 3.8 at 56.2, then it slowly increases to 58.8 at PyPy
3.11](/images/2025-pypy-cpy-sizes.png)
