uv
ed000d0d - puffin-resolver: add singleton fast path

Commit
2 years ago
puffin-resolver: add singleton fast path In many cases, version ranges are actually just pins to a specific and single version. And we can detect that statically by examining the range. If we do have a range that is just one version, then we can ask a `VersionMap` for just that version instead of iterating over what's in the map until we find one that satisfies the range. I had tried this before making `VersionMap` construction lazy, but it didn't seem to matter much. But helps a lot more now with a lazy `VersionMap` because it lets us avoid creating a lot of distributions in memory that we won't ultimately use.
Author
Committer
Parents
Loading