Remove `[u64; 4]` from small version to move `Arc` to full version

#10345Merged
Comparing
konsti/opt-small-version-arc
(
c09adcf
) with
main
(
14a9008
)
CodSpeed Performance Gauge
+29%
Improvements
3
Regressions
0
Untouched
11
New
0
Dropped
0
Ignored
0

Benchmarks

Improved

resolve_warm_jupyter
crates/uv-bench/benches/uv.rs::uv::resolve_warm_jupyter::resolve_warm_jupyter
CodSpeed Performance Gauge
+29%
95 ms
73.6 ms
resolve_warm_airflow
crates/uv-bench/benches/uv.rs::uv::resolve_warm_airflow::resolve_warm_airflow
CodSpeed Performance Gauge
+23%
1,039.2 ms
841.5 ms
resolve_warm_jupyter_universal
crates/uv-bench/benches/uv.rs::uv::resolve_warm_jupyter_universal::resolve_warm_jupyter_universal
CodSpeed Performance Gauge
+11%
232.7 ms
209.6 ms

Passed

wheelname_parsing[flyte-long-compatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-long-compatible]
CodSpeed Performance Gauge
+4%
10.2 µs
9.8 µs
wheelname_parsing[flyte-short-compatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-short-compatible]
CodSpeed Performance Gauge
+4%
6.2 µs
6 µs
wheelname_parsing[flyte-short-incompatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-short-incompatible]
CodSpeed Performance Gauge
+4%
6.3 µs
6.1 µs
wheelname_parsing[flyte-long-incompatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_parsing::wheelname_parsing[flyte-long-incompatible]
CodSpeed Performance Gauge
+3%
13.8 µs
13.5 µs
wheelname_tag_compatibility[flyte-long-compatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-long-compatible]
CodSpeed Performance Gauge
0%
2.1 µs
2.1 µs
wheelname_tag_compatibility[flyte-long-incompatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-long-incompatible]
CodSpeed Performance Gauge
0%
1.5 µs
1.5 µs
wheelname_tag_compatibility[flyte-short-compatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-short-compatible]
CodSpeed Performance Gauge
0%
2 µs
2 µs
build_platform_tags[burntsushi-archlinux]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_build_platform_tags::build_platform_tags[burntsushi-archlinux]
CodSpeed Performance Gauge
0%
1.2 ms
1.2 ms
wheelname_parsing_failure[flyte-short-extension]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_parsing_failure::wheelname_parsing_failure[flyte-short-extension]
CodSpeed Performance Gauge
-2%
1.8 µs
1.9 µs
wheelname_parsing_failure[flyte-long-extension]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_parsing_failure::wheelname_parsing_failure[flyte-long-extension]
CodSpeed Performance Gauge
-2%
1.8 µs
1.8 µs
wheelname_tag_compatibility[flyte-short-incompatible]
crates/uv-bench/benches/distribution_filename.rs::uv_distribution_filename::benchmark_wheelname_tag_compatibility::wheelname_tag_compatibility[flyte-short-incompatible]
CodSpeed Performance Gauge
-3%
1 µs
1 µs

Commits

Click on a commit to change the comparison range
Base
main
14a9008
+26%
Remove `[u64; 4]` from small version to move `Arc` to full version Cloning and dropping the version arc took a significant fraction of the time in the resolver, which is a large overhead especially for the small variant that has only 9 bytes payload. When moving the `Arc` to only apply to the full variant, the small variant is too large because it stores a `[u64; 4]` to have a release accessor a `&[u64]` that's shared with the `Vec<u64>` of the full variant. We proxy this by first extracting the compressed version digits of the small variant to a proxy type that stores up to 4 u64 on the stack and can be deref'ed to the existing `&[u64]`, minimizing churn. ``` $ Benchmark 1: target/profiling/uv pip compile scripts/requirements/airflow.in Time (mean ± σ): 361.3 ms ± 2.7 ms [User: 503.4 ms, System: 174.9 ms] Range (min … max): 356.3 ms … 365.2 ms 10 runs Benchmark 2: ./uv-3 pip compile scripts/requirements/airflow.in Time (mean ± σ): 402.9 ms ± 8.5 ms [User: 571.2 ms, System: 196.6 ms] Range (min … max): 393.9 ms … 418.0 ms 10 runs Summary target/profiling/uv pip compile scripts/requirements/airflow.in ran 1.12 ± 0.03 times faster than ./uv-3 pip compile scripts/requirements/airflow.in ```
64a8980
3 months ago
by konstin
+3%
Windows clippy: Fix too large future
182975a
3 months ago
by konstin
-1%
Improve docs
c09adcf
3 months ago
by konstin
© 2025 CodSpeed Technology