Repository navigation
Conversation
2184736 to
deaeb5d
Compare
deaeb5d to
a58f5c4
Compare
a58f5c4 to
948c8f5
Compare
Merging this PR will improve performance by ×9.2
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | unzip_wheel_many_files |
371 ms | 12.3 ms | ×30 |
| ⚡ | WallTime | install_wheel_many_files |
385 ms | 13.7 ms | ×28 |
| ⚡ | WallTime | prepare_wheel_many_files |
383.4 ms | 14.9 ms | ×26 |
| ⚡ | WallTime | unpack_sdist_many_files |
317.2 ms | 36.9 ms | ×8.6 |
| ⚡ | WallTime | resolve_warm_jupyter_universal |
87.6 ms | 11.7 ms | ×7.5 |
| ⚡ | WallTime | resolve_warm_jupyter |
17.4 ms | 2.5 ms | ×7 |
| ⚡ | WallTime | discover_workspace_from_all_members_with_excludes |
52.7 ms | 8.3 ms | ×6.3 |
| ⚡ | WallTime | discover_workspace_from_all_members |
50.5 ms | 8 ms | ×6.3 |
| ⚡ | WallTime | run_python_version_synthetic_workspace |
268.4 ms | 43.3 ms | ×6.2 |
| ⚡ | WallTime | resolve_warm_airflow |
233.2 ms | 41.7 ms | ×5.6 |
| ⚡ | WallTime | hash_sha256 |
1,165.6 µs | 407.8 µs | ×2.9 |
| 🆕 | WallTime | flatten_dependency_group_with_python_markers |
N/A | 168.2 µs | N/A |
| 🆕 | Simulation | flatten_dependency_group_with_python_markers |
N/A | 3.9 ms | N/A |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing zb/bughuntperf/223-group-python-markers (948c8f5) with main (b7c8c62)2
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. ↩
-
No successful run was found on
main(00e49e7) during the generation of this report, so b7c8c62 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
Flattening a dependency group with
requires-pythonrebuilds the sameRequiresPythonand marker tree for every local or inherited requirement. Construct the marker once per configured group and combine it with each requirement's existing marker. This avoids repeated range construction without changing group bounds or requirement order.Hyperfine 2.0.0 measurements of 1f85ea101 → 948c8f57c 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.uv lock --no-index --find-linksincludes project parsing, group flattening, resolution, and serialization. Synthetic dependency groups have simple Python bounds or specifiers excluding 64 even-numbered Python 3.13 patch releases. Empty, populated, unconfigured, and inherited-group inputs are included. In the inherited case, a base group declares 256 requirements and an outer group includes the base twice and declares 256 of its own; the lock records 512 distinct outer-group requirements. Group Python markers use the bounding range, so the internal exclusions are not preserved as marker holes. Each command starts a fresh process. OS pages, local wheel metadata, and interpreter-query caches are warm. The lockfile is removed outside the measured interval.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 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.
For the empty-group cases, wall time rose 80.82% with 512 groups and 64 exclusions, and 3.79% with one group and simple bounds. It fell 19.11–47.82% in the three populated or inherited cases with exclusions; the other six runtime intervals include zero. Peak RSS fell in two cases, rose in one, and was inconclusive in the other eight. These are complete-command results and do not isolate marker construction. RSS is Hyperfine's Linux
wait4peak, not an allocation count or summed simultaneous process-tree memory.Earlier measurements
Earlier benchmark study:
The earlier paired component study also exposed an empty-group regression: its head
a58f5c41took 10.4795× as long as its basec8d39cb1, with a pointwise 95% interval of [10.3688, 10.5913]. Descriptive arithmetic means were about 164 ns and 1.714 µs per call. In that source pair, moving marker construction outside the requirement loop made it run even when there were no requirements. That regression was a landing concern in the earlier study; those measurements do not establish an effect for a subsequent fix.The complete prespecified comparison used base c8d39cb1 and head a58f5c41, isolated Rust
1.97.1release builds, a common lockfile and study overlay, and a dedicated 16-vCPU x86-64 Linux VM. The normalized source pair differs only incrates/uv-workspace/src/dependency_groups.rs. Ratios are head/base; intervals are pointwise 95% Student-t intervals for the mean paired log ratio, exponentiated.real/uvcontrol/unconfigured-emptycontrol/unconfigured-32control/configured-emptycontrol/simple-singletoncontrol/exclusions-singletoncontrol/simple-32control/exclusions-32control/exclusions-2048control/included-overlapcontrol/duplicate-includescontrol/included-empty-adverseEach workload began with 12 fresh-process A/A paired blocks. The fixed noise rule selected 12 or 24 A/B pairs, or left the workload A/A-inconclusive with no head/base estimate. The intervals are not simultaneous. This is a warm production-API component measurement from a preparsed
PyProjectToml; it includes group collection and flattening, requirement parsing, marker construction and composition, and result allocation and destruction. It excludes TOML parsing. The authenticuvmanifest was inconclusive, so this does not establish a cold-process or whole-command speedup. uv-dev#1572 and uv-dev#1578 remain the separate source-requirements and project-lock benchmark owners.The recorded samples, complete report, replay, and exact source overlays are retained in uv-dev#2259.