Repository navigation
Conversation
11a925f to
60e5321
Compare
60e5321 to
8c28b8d
Compare
8c28b8d to
12d7579
Compare
12d7579 to
6b0ecd2
Compare
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
c6490be to
da2bcf8
Compare
da2bcf8 to
02e18de
Compare
| success: true | ||
| exit_code: 0 | ||
| ----- stdout ----- | ||
|
|
||
| ----- stderr ----- |
There was a problem hiding this comment.
[P2] Update the snapshot to the current output format
uv_test::run_and_format emits exit_code: 0 (success) and omits empty stdout, so this snapshot cannot match even when reinstallation succeeds. Regenerate this snapshot using the current formatter, matching the neighboring snapshots.
| fs-err = { workspace = true } | ||
| futures = { workspace = true } | ||
| jiff = { workspace = true } | ||
| rmp-serde = { workspace = true } |
There was a problem hiding this comment.
[P2] Remove the unused rmp-serde dependency
No source or benchmark in uv-bench uses rmp-serde. This adds an unused dependency that the configured cargo-shear --deny-warnings CI check will flag. Remove this declaration and its corresponding uv-bench dependency entry in Cargo.lock.
| use std::hint::black_box; | ||
| use std::str::FromStr; |
There was a problem hiding this comment.
[P3] Use uv's allocator in the construction benchmarks
The planner-* and build-* measurements include allocating and dropping hash sets, but this benchmark does not link uv_performance_memory_allocator. Consequently, it measures the system allocator instead of uv's jemalloc on Linux or mimalloc on Windows, affecting the construction cost compared with the allocation-free linear control. Add the same extern crate uv_performance_memory_allocator declaration used by neighboring allocation-sensitive benchmarks.
uv pip installanduv pip syncrepeatedly check resolved or installed distributions against--reinstall-package. Index multi-package selections in the resolver and share the owned index across exclusion clones. The install planner uses a borrowed index when both the selection and resolution contain multiple packages. Empty and single-name selections remain on the direct path, and path-based reinstall remains independent of name membership.Hyperfine 2.0.0 measurements of d644be28b → da2bcf884 used release builds with Rust 1.99.0 and CPython 3.12.13 on an AMD EPYC-Genoa Linux VM, pinned to four CPUs. The command was
uv pip install -r requirements.in --dry-run --upgrade --no-index --find-links WHEELS --python VENV_PYTHON, with--offline --no-config --color never --cache-dir CACHE. Output went to/dev/null.Each requested 1.0.0 package is already installed, and valid local wheels provide the same versions.
--upgradeforces resolution despite the satisfied versions;--reinstall-packageis repeated for each selected name to choose the replacement plan. Empty, single-name, and multi-name selections cover construction and membership costs. The one-package, 1,024-absent-name case is a construction-cost control. Every process resolves the local requirements and computes a plan. The dry run excludes actual file removal and installation. OS pages, interpreter queries, and wheel metadata caches were warm.Values are means, parent → head. Changes are
(head / parent - 1)with 95% confidence intervals; negative values indicate a reduction.Each workload used ten comparison blocks with alternating revision order, one warmup followed by three measured runs per revision in each block (30 measurements per revision). The 95% percentile-bootstrap intervals use 20,000 resamples of paired block means and retain all samples. They estimate within-run uncertainty, not variation across machines, independent builds, or separate benchmark campaigns.
On the 2,048-package graph, the 1,024-name present and absent selections take 3.4% and 1.5% less time, respectively; the single absent-name control takes 0.8% less time. The other four runtime intervals include zero, including the one-package construction-cost control. All three large-graph peak-RSS intervals include zero. The empty-selection and one-package controls use about 0.16 MiB less peak RSS; the other small-case RSS intervals include zero. These results cover complete dry-run planning and do not measure actual reinstallation. RSS is Hyperfine's Linux
wait4peak, not an allocation count or summed simultaneous process-tree memory.Existing component benchmarks
The
reinstall_membershipbenchmark isolates owned-index lookup, borrowed-index construction and lookup, and the linearReinstall::contains_packagereference. It covers small selections, hits, misses, and construction costs; the quadratic reference is capped for instrumented runs. These are membership component clocks, not measurements ofExclusions,Planner::build, or complete install commands.