-
Notifications
You must be signed in to change notification settings - Fork 88
compare_to command: add geometric mean #79
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
Conversation
When comparing suites with more than one benchmark, compute the geometric mean of benchmark speeds, to compare a whole suite to the reference suite with a single number.
|
@methane @pablogsal @serhiy-storchaka: Would you mind to have a look at this new feature? I'm not sure that I compute the geometric mean of the correct thing. IMO it's a big feature and it should help a lot to compare two benchmark suites using a single number rather than 30 numbers. A geometric mean has no unit. It's a unusual value. In short, geo mean > 1.0 means "faster", geo mean < 1.0 means "slower". PyPy uses the geometric mean to compare PyPy to CPython as a single number. speed.pypy.org announces: "The geometric average of all benchmarks is 0.24 or 4.2 times faster than cpython" I'm not sure that speed.pypy.org and my PR compute the geometric mean of the same thing, since it announces that 0.24 means "faster". My PR computes the geometric mean of all "speeds". The speed of a benchmark is the ratio: (benchmark mean) / (reference benchmark mean). |
Set also the version to 2.1.0
Oops, I computed the geometric mean backwards. I normalized reference / benchmark, but the correct fomula is benchmark / reference. I completed my PR to update the documentation which explains how the geometric mean is computed and what it means. |
Use (benchmark mean) / (reference mean), rather than (reference mean / benchmark mean), to use the same ratio than the geometric mean: normalize the mean to the reference.
|
I wrote this PR when I saw bench_results.txt of https://bugs.python.org/issue41972 : it's really hard to read all these numbers and understand if it's faster or slower. |
|
I rewrote this PR as a serie of commits. It's now implemented in the master branch, I close this PR. |
|
The last commit adding the feature to the "compare" command is the commit 0518a22. Example: |
When comparing suites with more than one benchmark, compute the
geometric mean of benchmark speeds, to compare a whole suite to the
reference suite with a single number.