Uh oh!
There was an error while loading. Please reload this page.
Use uv venv and uv pip - #425
Conversation
uv venv instead of python venvuv venv instead of python -m venv
--python accepts binaries, eg custom PyPy3 build:
|
No there are a lot of implementations over you listed. e.g RustPython Jython gpython. Let s not make a big huddle to them. |
Unless you have a strong motivation to maintain this project based on uv, let's keep it as is based on standard(pip). |
Fidget-Spinner
commented
Dec 5, 2025
That doesn't matter. Not to diss the other implementations, but they most likely can't even run pip. If you can't even run pip, there's no point supporting these.
There's a reason to not switch to uv by default though --- that would be a breaking change of pyperformance likely requiring a major version bump. @maurycy I think this is really great work and I would be willing to accept this PR if the default stayed pip, but you allow an option/command line flag to switch to uv. Then I think @corona10's concerns should be solved. |
Fidget-Spinner
commented
Dec 5, 2025
FWIW, starting a pip subprocess is extremely slow on other implementations like GraalPy. Even on CPython it is slow. Running a benchmarking run on GraalPy might be faster if we switch to uv, so I'm very much looking forward to this change. |
It will be fine with switching to uv as an optional feature as Ken Jin commented.
For clarity, they can run old pip but fail with the latest pip; anyway, they have a chance to run pyperformance using old pip. |
* main: Bump mypy from 1.19 to 1.19.1 (python#448) Add a YAML-parsing benchmark (python#342) Add FastAPI HTTP request benchmark (python#440) Add option for rigorous in benchmark.conf.sample (python#446) Do not `venv.ensure_reqs` twice (python#432) Bump mypy from 1.18.2 to 1.19.0 (python#442) Bump actions/checkout from 5 to 6 in the actions group (python#441) Add example scripts to run pyperformance on a generic host (python#436) Prepare for 1.13.0 release (python#435) Reenable xdsl (python#433) Bump actions/setup-python from 5 to 6 (python#429) Group Dependabot updates for GitHub Actions into single PR (python#431) Bump actions/checkout from 4 to 5 (python#430)
* main: Replace pre-commit with prek in CI and add cooldown to Dependabot (python#452) Add bm_base64 covering common base64 module APIs (python#447)
This is a conversation starter now: should we gradually start moving towards
uvthat handles custom builds, venvs and pinned runs more efficiently?The code already works, confirmed with:
Tests are 2x faster:
I didn't want to do too many changes at once, but in my opinion the best direction would be iterating over each benchmark with
uv.pyperformanceis just a benchmark suite after all, and the whole venv, custom build etc. management makes it unnecessarily complex.Notably,
uv runhas --project, --isolated (now it's isolated if the requirements cannot be met), --with-requirements and --python (supporting custom builds), eg:This is similar to what happens now, just merging temporary outputs.
From what I measured venv management and dependencies only take ~5% of the
runtime, so no dramatic speed up should be expected, but the simplification might be worth it. Important to keep in mind that many features are never ever used, if a large chunk of benchmarks stays broken for so long and some obvious issues lurked for a while.Another elephant in the room is compile that could also be outsourced.
I'm more than open to any suggestions!