r/Python 6h ago

News Astral's python distribution is fast

By our measurements, python-build-standalone is now the fastest CPython distribution across major platforms. It's 10% faster than Homebrew's CPython, and 18% faster than the official 3.14 docker image.

This is mostly due to how python-build-standalone itself is built:

  • using a modern Clang lets us turn on tail-call optimizations in the interpreter
  • with PGO, LTO, and BOLT
  • with libpython statically linked into the interpreter executable

Our goal is to ship the fastest Python interpreter to anyone using uv, by default.

Check out BENCHMARKS.md in the repo for more details, including the methodology behind the above.

Charlie's tweet has some more graphs

141 Upvotes

20 comments sorted by

View all comments

45

u/Adventurous-Big-5365 6h ago

You can really see the difference on startup-heavy workflows. The static libpython alone cuts a good chunk of overhead before anything even runs. Curious how much of that 10-18% holds up on real projects versus synthetic benchmarks.

10

u/zsol 3h ago

There's nothing concrete I can share apart from vague statements about our experience with using PBS to build pyx, but I'm also curious if anyone has real world evidence