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

Split benchmark packages #1276

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shirok
Copy link
Collaborator

@shirok shirok commented Oct 2, 2024

As we have more benchmarks, it is more convenient to allow running not only the entire benchmarks, but the specific group of benchmarks of concern. Trivial-benchmarks treats each benchmark package as a group. This patch establishes a convention to create multiple benchmark packages.

These commits try to keep changes small, for easier transition.

benchmark-clauses
&rest native-clauses)
(let ((benchmark-package (intern (format nil "BENCHMARK-~S" name) 'keyword))
(native-package (intern (format nil "BENCHMARK-~S/NATIVE" name) 'keyword)))
Copy link
Member

Choose a reason for hiding this comment

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

Can these be COALTON-BENCHMARK/...? It's a little wordier, but worth it.

Maybe also add a default package local nickname "NATIVE" for the native package. That way the actual benchmarks can always refer to native:....

In general I don't like symbol generating macros, but for this limited use case I think it's fine.

@Izaakwltn
Copy link
Collaborator

Just a quick note: trivial-benchmarks on quicklisp is out of date, and the API has changed significantly (there are no longer benchmark packages).

Issue #1204

@shirok
Copy link
Collaborator Author

shirok commented Oct 2, 2024

Any recommendation for alternative benchmarking package?
I have several benchmarks depending on this change, so I'd like to solidify the foundation of benchmarking now.

@Izaakwltn
Copy link
Collaborator

Are your benchmarks using mostly Coalton or would you ideally like equal support for Common Lisp benchmarks?

@shirok
Copy link
Collaborator Author

shirok commented Oct 3, 2024

I aim at specific use patterns that are expected to be optimized by the Coalton compiler, but it includes Common Lisp counterpart as base cases, so the framework needs to measure both cases.

@Izaakwltn
Copy link
Collaborator

I wrote an initial draft of a potential implementation in Coalton, does this look like it might be able to support what you want in your benchmarks?
#1286

@shirok
Copy link
Collaborator Author

shirok commented Oct 3, 2024

Yes. At this moment, the essential feature is to have a standard way to define benchmarks and run them per-package. I can call plain-CL version of benchmark code from Coalton anyway.

If #1286 will be merged soon, I'll adapt my other benchmarks to it.

This change allows each group of benchmarks to be run selectively,
as well as running all of them at once.

A new macro `define-coalton-benchmark` provides boilerplate of package definitions.
See README.md for the instructions.
@shirok shirok force-pushed the split-package-benchmarks branch from 3079688 to 3b1d6fe Compare October 3, 2024 09:15
@shirok
Copy link
Collaborator Author

shirok commented Oct 3, 2024

Reflected @stylewarning's comment and rebased. If the new Coalton-based benchmark suite may take some time to mature, I'd suggest this to be an intermediate step.

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

Successfully merging this pull request may close these issues.

3 participants