Charlie Marsh: uv: An Extremely Fast Python Package Manager

Channel:Jane Street · Length:40:33 · Published:2024-10-23 · Views:108017

Watch on YouTube

Summary

Charlie Marsh of Astral explains how uv, a Rust Python package manager, got so fast. He covers allocators, concurrency, zero-copy tricks and the challenges of Python packaging.

Why HN recommends it

Recommended as a fascinating technical account of the optimizations behind uv's speed.

I recently watched a talk by the author of uv that was surprisingly fascinating — HN, 2024

C, C++, Rust, Go & systems languages · Python, Ruby & scripting languages · Software performance & optimization

Subtitles (excerpt)

- Hi everyone. (indistinct audience chatter) Charlie Marsh is the founder of Astral, a company building high performance developer tools for the Python ecosystem. Over the past two years, he's released Ruff, a Python lintern auto formatter, and UV, a Python package and project manager. Both projects have grown to tens of millions of downloads per month, and have seen rapid adoption across both open-source and enterprise. - Okay, everyone can hear me? Okay, great, excellent. Wow, very nice intro. Now, what am I gonna do with my own intro slides? Yeah, my name is Charlie, I'm the founder of Astral. Yeah, so I, me and my team, we spend our time trying to build really fast Python tooling in Rust. We're primarily known for two tools, right? The first of which is Ruff, which is a linter, formatter, and code transformation tool. So you can use it to format your code, but also to identify issues like unused imports and fix 'em automatically. And the second, which is gonna be the focus of what I'm talking about today, is UV, which is our Python package manager. I gave a talk at PyCon about Ruff, and it sort of covered what Ruff is, a little bit of how it works, and then what makes it fast. This is gonna be similar, but focused on UV.

On Hacker News

I recently watched a talk by the author of uv that was surprisingly fascinating [1]. He goes into a few of the more notable hacks that they had to come up with to make it as fast as it is. The most interesting thing for me was that package resolution in python given constraints defined (eg. in requirements.txt) maps to a boolean satisfiability problem which is NP-complete. So uv uses a custom SAT… — kolja005, 2024-11
To be fair, the whole post isn't very good IMO, regardless of ChatGPT involvement, and it's weird how some people seem to treat it like some kind of revelation. I mean, of course it wasn't specifically Rust that made it fast, it's really a banal statement: you need only very moderate serious programming experience to know, that rewriting legacy system from scratch can make it faster even if you r… — krick, 2025-12
There is a talk about it from one of the authors here: [VIDEO] tl;dw Rust, a fast SAT solver, micro-optimisation of key components, caching, and hardlinks/CoW. — globular-toast, 2025-06
So much love for @burntsushi He's improved my life in so many ways, rg, ... and now also in Python with uv! Glad to see Charlie giving him the credit for figuring out the version comparison optimization in uv in [1]. Also huge thank you to the whole Astral team for all they're doing on uv It's magic! 1: [VIDEO] — snthpy, 2024-12

Related videos