forked from paugier/piconumpy
-
Notifications
You must be signed in to change notification settings - Fork 2
Update benchmarks and CI #9
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paugier
wants to merge
35
commits into
hpy
Choose a base branch
from
microbench_loop_sum
base: hpy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
631d1d8
to
010d2ad
Compare
I added a description to this PR. Can anyone have a quick look? The changes are mostly about benchmarks and updates. The C code is not touched. I don't think a detailed review on the benchmark/profiling code is needed, since it is quite boring and harmless. |
This was referenced May 14, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I updated the benchmarks, Makefiles, pyproject.toml and CI. I think such benchmarks are important to show the potential of HPy. They are not representative of most real life programs but the results are strongly dependent of the efficiency of C calls and using in Python native objects defined in C extensions.
So I think this would be useful to merge this in the default branch (
hpy
).Locally, I was able to build, install, test and run benchmarks with CPython, PyPy and GraalPy. (However, I didn't try to run the full benchmarks using Pythran in GraalPy).
This is now very simple for anyone to reproduce these benchmarks, without direct calls to setup.py which are deprecated.
The results can be summarized as (data from the CI):
The main negative point is that the results with HPy Universal are bad on PyPy (and even worse on GraalPy).
To convince people that it is useful to invest on HPy, we'd need to improve this, and PyPy with HPy universal should be approximately as fast as CPython with its C API (a bit faster would of course be better but...).
Also, with CPython, PicoNumpy-HPy-CPy-ABI should be as fast as PicoNumpy-CPython-C-API, but we need to check if these two implementations of PicoNumpy as actually equivalent (PicoNumpy-CPython-C-API might be less safe).
I think I have few simple microbenchmarks showing some performance issues, in particular
instantiate
piconumpy/bench/microbench_low_level/bench.py
Line 129 in 7a3f182
element_wise
piconumpy/bench/microbench_low_level/bench.py
Line 136 in 7a3f182
I'm going to create separate issues on PyPy and GraalPy.