Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Useuv venv anduv pip#425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
maurycy wants to merge25 commits intopython:main
base:main
Choose a base branch
Loading
frommaurycy:uv
Draft

Useuv venv anduv pip#425

maurycy wants to merge25 commits intopython:mainfrommaurycy:uv

Conversation

@maurycy
Copy link
Contributor

@maurycymaurycy commentedOct 24, 2025
edited
Loading

This is a conversation starter now: should we gradually start moving towardsuv that handles custom builds, venvs and pinned runs more efficiently?

The code already works, confirmed with:

python dev.py run

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 withuv.pyperformance is just a benchmark suite after all, and the whole venv, custom build etc. management makes it unnecessarily complex.

Notably,uv run has--project,--isolated (now it's isolatedif the requirements cannot be met),--with-requirements and--python (supporting custom builds), eg:

8:41:50.613123804PM CEST maurycy@gunnbjorn ~/pyperformance (uv) % uv run --isolated --project=benchmarks/bm_sympy --python=/home/maurycy/cpython/python benchmarks/bm_sympy/run_benchmark.pyInstalled 4 packages in 12ms.....................sympy_expand: Mean +- std dev: 281 ms +- 1 ms.....................sympy_integrate: Mean +- std dev: 12.8 ms +- 0.1 ms.....................sympy_sum: Mean +- std dev: 92.8 ms +- 0.8 ms.....................sympy_str: Mean +- std dev: 161 ms +- 1 ms

This is similar to what happens now, just mergingtemporary outputs.

From what I measured venv management and dependencies only take ~5% of therun time, 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, ifa large chunk of benchmarks stays broken for so long andsome obvious issues lurked for a while.

Another elephant in the room iscompile that could also be outsourced.

I'm more than open to any suggestions!

ulgens reacted with thumbs up emojiulgens and Fidget-Spinner reacted with heart emoji
@maurycymaurycy marked this pull request as draftOctober 24, 2025 23:41
@maurycymaurycy changed the titleUseuv venv instead ofpython venvUseuv venv instead ofpython -m venvOct 25, 2025
@maurycymaurycy changed the titleUseuv venv instead ofpython -m venvUseuv venv anduv pipOct 25, 2025
Copy link
Member

@corona10corona10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Since pyperformance users include not only CPython but also alternative implementations, I don’t think relying on uv would be a good approach for us to take. cc@hugovk

@maurycy
Copy link
ContributorAuthor

maurycy commentedOct 26, 2025
edited
Loading

Since pyperformance users include not only CPython but also alternative implementations, I don’t think relying on uv would be a good approach for us to take. cc@hugovk

uv supportsCPython, PyPy, GraalPy and Pyodidie

--python accepts binaries, eg custom PyPy3 build:

10:36:09.653252000AM CET maurycy@gimel /Users/maurycy/src/pyperformance % uv run --isolated --project=benchmarks/bm_sympy --python=`which pypy3` benchmarks/bm_sympy/run_benchmark.py      Built psutil==7.1.2Installed 4 packages in 68ms.......sympy_expand: Mean +- std dev: 73.9 ms +- 6.0 ms.......sympy_integrate: Mean +- std dev: 22.5 ms +- 3.8 ms.......sympy_sum: Mean +- std dev: 46.7 ms +- 6.6 ms.......sympy_str: Mean +- std dev: 51.1 ms +- 11.6 ms

If I understand correctly,the only requirement is that-I,-B and-C needs to be supported by an interpreter. I might be totaly wrong here, though.uv seems to checksys.implementation.name andmatch it

refastral-sh/uv#2096

@corona10
Copy link
Member

corona10 commentedOct 26, 2025
edited
Loading

No there are a lot of implementations over you listed. e.g RustPython Jython gpython. Let s not make a big huddle to them.

@corona10
Copy link
Member

corona10 commentedOct 26, 2025
edited
Loading

Unless you have a strong motivation to maintain this project based on uv, let's keep it as is based on standard(pip).
I love uv but this should consider other factors.

@Fidget-Spinner
Copy link
Member

No there are a lot of implementations over you listed. e.g RustPython Jython gpython. Let s not make a big huddle to them.

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.

  1. RustPython can't run pipTracking pip support in RustPython RustPython/RustPython#5332
  2. Jython only supports Python 2.7, which clearly can't use pyperformance.
  3. GPython saysgpython does not include many python modules as many of the core modules are written in C not python. So that's also not gonna work.

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
Copy link
Member

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.

@corona10
Copy link
Member

corona10 commentedDec 5, 2025
edited
Loading

@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.

It will be fine with switching to uv as an optional feature as Ken Jin commented.

RustPython can't run pipRustPython/RustPython#5332

For clarity, they can run old pip but fail with the latest pip; anyway, they have a chance to run pyperformance using old pip.
RustPython/RustPython#5332 (comment)
so switching to uv by default will be a big hurdle for new challengers :)

Fidget-Spinner and maurycy reacted with thumbs up emoji

* 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)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@corona10corona10corona10 left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@maurycy@corona10@Fidget-Spinner

[8]ページ先頭

©2009-2026 Movatter.jp