mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-24 05:35:04 +00:00
![]() Two low-hanging fruits as optimizations for version parsing: A fast path for release only versions and removing the regex from version specifiers (still calling into version's parsing regex if required). This enables optimizing the serde format since we now see the serde part instead of only PEP 440 parsing. I intentionally didn't rewrite the full PEP 440 at this step. ```console $ hyperfine --warmup 5 --runs 50 "target/profiling/puffin pip-compile scripts/requirements/transformers-extras.in" "target/profiling/main pip-compile scripts/requirements/transformers-extras.in" Benchmark 1: target/profiling/puffin pip-compile scripts/requirements/transformers-extras.in Time (mean ± σ): 217.1 ms ± 3.2 ms [User: 194.0 ms, System: 55.1 ms] Range (min … max): 211.0 ms … 228.1 ms 50 runs Benchmark 2: target/profiling/main pip-compile scripts/requirements/transformers-extras.in Time (mean ± σ): 276.7 ms ± 5.7 ms [User: 252.4 ms, System: 54.6 ms] Range (min … max): 268.9 ms … 303.5 ms 50 runs Summary target/profiling/puffin pip-compile scripts/requirements/transformers-extras.in ran 1.27 ± 0.03 times faster than target/profiling/main pip-compile scripts/requirements/transformers-extras.in ``` --------- Co-authored-by: Andrew Gallant <andrew@astral.sh> |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml |