Skip to content
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

Tracking Benchmarks #29

Open
FirefoxMetzger opened this issue Dec 24, 2022 · 5 comments
Open

Tracking Benchmarks #29

FirefoxMetzger opened this issue Dec 24, 2022 · 5 comments

Comments

@FirefoxMetzger
Copy link
Contributor

Since we constantly talk about improving the performance of the routines provided by pylinalg, I was wondering if there are any plans on formally tracking benchmarks of various routines to make sure that we don't regress in terms of speed.

@Korijn
Copy link
Contributor

Korijn commented Dec 24, 2022

I've done a bit of research on benchmarking and found it hard to come up with a good strategy. What do you propose?

@ivoflipse
Copy link

Have a look at https://github.com/python/pyperformance which is used for benchmarking Python itself. It allows you to create a suite of test to regularly run.

The biggest challenge comes from having a properly configured benchmark machine, as a lot of factors can contribute to different benchmark results that have nothing to do with the actual code changes. But I still think it's worthwhile to check for unintended regression that are big enough to be caught by noisy benchmarking.

As long as you use the same hardware and follow some best practices for benchmarking, I think you'll be fine. Having some numbers may be better than none at all. We can always improve the benchmark setup once the noise starts to dominate.

@FirefoxMetzger
Copy link
Contributor Author

Scikit-Image also maintains a benchmark suite. At the time I was contributing it was still being finalized, so I can't say how much it is actually enforced, but it could serve as inspiration:

Docs: https://scikit-image.org/docs/stable/contribute.html#benchmarks
CI: https://github.com/scikit-image/scikit-image/blob/main/.github/workflows/benchmarks.yml

@Korijn
Copy link
Contributor

Korijn commented Dec 27, 2022

I really like the airspeed velocity tool that sk-image uses! Like Ivo indicates, to me the core issue has always been to compare results from one benchmark run to another, between machines and even the same machine over time. The concept that av brings to the table - just run the benchmark for older commits here and now on the same machine, and compare - is a pretty clever solution!

@epompeii
Copy link

I've been working on a continuous benchmarking tool called Bencher that supports both use cases, either tracking benchmarks over time for comparison or using relative benchmarking (similar to asv) : https://github.com/bencherdev/bencher
The idea is for it to be like a pyperformance for your application code. Would that be helpful here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants