Repository navigation
Conversation
ed77ba3 to
365a81a
Compare
365a81a to
cd72569
Compare
cd72569 to
3c07b2d
Compare
3c07b2d to
57771e1
Compare
57771e1 to
4986469
Compare
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| 🆕 | Simulation | cached[1024] |
N/A | 20.7 ms | N/A |
| 🆕 | Simulation | cached[256] |
N/A | 1.3 ms | N/A |
| 🆕 | Simulation | cached[64] |
N/A | 39.4 µs | N/A |
| 🆕 | Simulation | rebuild[1024] |
N/A | 664.8 ms | N/A |
| 🆕 | Simulation | rebuild[256] |
N/A | 37.2 ms | N/A |
| 🆕 | Simulation | rebuild[64] |
N/A | 2.1 ms | N/A |
Comparing zb/bughuntperf/265-fetch-index-enumeration (bb9747d) with main (f426bf7)
Footnotes
-
35 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
4986469 to
5029f65
Compare
| use std::hint::black_box; | ||
| use std::str::FromStr; | ||
| use std::sync::Arc; |
There was a problem hiding this comment.
[P3] Use uv's allocator in the enumeration benchmark
This benchmark does not link uv_performance_memory_allocator, so it uses the system allocator instead of uv's jemalloc on the Linux benchmark runners. That matters here: rebuild repeatedly allocates and frees hash sets, while cached performs no timed allocations, making the comparison sensitive to allocator choice. Add the same extern crate uv_performance_memory_allocator; prelude used by uv_pypi_types.rs and workspace_discovery.rs so the benchmark measures allocation costs under uv's runtime configuration.
5fae614 to
bb9747d
Compare
bb9747d to
473e21a
Compare
473e21a to
b8bb721
Compare
Resolving against many configured indexes repeatedly rebuilds the implicit/default-index sequence and its name and raw-URL deduplication sets for each package request without an index pin. Materialize the effective sequence when
RegistryClientis built and share it across client clones. Package requests then iterate that sequence while pinned-index selection, PyTorch-specific routing, index precedence, and--no-indexretain their respective behavior.Hyperfine 2.0.0 measurements of f426bf737 → bb9747d62 used release builds of the complete CLI with
rustc 1.99.0 (b940084d7 2026-09-28)on an AMD EPYC-Genoa Linux VM, pinned to four CPUs. Output went to/dev/null. The supplied interpreter was CPython 3.12.13.Complete
uv pip compilecommands resolve synthetic requirements pinned to version 1.0.0 against loopback Simple indexes, with no per-package index pin. Cases vary package and index counts, index strategy, the fixture index containing the wheel catalog and repeated index URLs. Fixture positions in the table are zero-based identifiers, not lookup-order positions. The repeated case has 64 distinct URLs and 127 configured occurrences. Client construction, index handling, resolution and requirements formatting are included.Most cases use per-revision HTTP caches with 24-hour response freshness. A cold control clears both caches before each invocation; later warmups can refill them. The loopback server has no configured delay or pacing and runs outside measured RSS; request-boundary preparation is outside timing, and OS pages are warm.
Values are means, parent → head. Changes are
(head / parent - 1)with 95% confidence intervals; negative values indicate a reduction.unsafe-best-match/ warm cacheunsafe-best-match/ warm cacheunsafe-best-match/ warm cacheunsafe-best-match/ warm cacheunsafe-best-match/ warm cacheunsafe-best-match/ warm cacheunsafe-best-match/ warm cacheunsafe-best-match/ warm cachefirst-index/ warm cacheunsafe-best-match/ 127 configured URL occurrences / warm cacheunsafe-best-match/ cold cachefirst-index/ warm cacheEach 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 pointwise 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.
Runtime increased by 2.43% for the 64-index, one-package
unsafe-best-matchcase and 2.17% for the 64-index, 64-packagefirst-indexcase. The other ten runtime intervals include zero. Peak RSS fell by 0.49% for the one-index, 64-package control; the other eleven RSS intervals include zero. These complete-command results do not isolate index enumeration.RSS is Hyperfine's Linux
wait4peak, not an allocation count or summed simultaneous process-tree memory.Earlier measurements
Earlier benchmark study:
The
fetch_index_enumerationbenchmark compares the productionIndexLocations::fetch_indexesoperation with iteration over a prebuilt sequence. It uses 64, 256, and 1,024 synthetic named indexes, the implicit PyPI fallback, and the same number of complete sequence traversals. Fixture and cached-sequence construction are outside the clock; no network request or complete resolver command is timed.An earlier working tree based on
3ddafbf3fd8a154fd875dbb63d12dcb4058b4820used aVec<IndexMetadata>before the final sharedArcrepresentation. Its benchmark blob wasa4d097186dd16232858cda44636cd0f9b9318acd. A Rust 1.97.0 profiling build ran two CPU-pinned Criterion sweeps with 30 samples, one second warmup, and three seconds requested measurement time. The following are the retained 95% absolute typical-estimate intervals (slope when present, otherwise mean). The last column is the second run's arithmetic mean divided by its saved first-run mean, minus one; it describes repeat variation for the same endpoint, not a cached-versus-rebuild effect interval.rebuild/64cached/64rebuild/256cached/256rebuild/1024cached/1024The measured source diff is retained, but the full historical build archive, executable digest, and raw Criterion samples are not. These runs did not measure the final
Arcimplementation or a whole-command comparison, so the component intervals do not establish a whole-command speedup.