4 ms·
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
by kolja005 2y ago
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 solver to do this. I totally under-appreciated how much goes into this software and I'm bummed I have to use Poetry at work after having watched this talk.
[1] https://www.youtube.com/watch?v=gSKTfG1GXYQ https://www.youtube.com/watch?v=gSKTfG1GXYQ
edit: NP-complete not NP-hard
- wenc 2y agoI haven’t used Conda since 2021 but recall it had a SAT solver that was very slow especially on degenerate cases. How does uv’s sat solver compare?
- sa1 2y agoThere are such cases in uv as well, and I’ve hit them quite often when I didn’t specify lower bounds (especially for boto3).
- montebicyclelo 2y agoConda has a faster solver, as of 2022 https://www.anaconda.com/blog/a-faster-conda-for-a-growing-community https://www.anaconda.com/blog/a-faster-conda-for-a-growing-c...
- thundergolfer 2y agoIn our internal benchmarks miniconda is about as fast as uv at installing torch.