-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add union-find benchmark #781
Conversation
Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a dependency in Boost.ProgramOptions and not in a Google benchmark?
I think the dependency on boost.program_options is required because I want to allow running the benchmark with different problem sizes, which would depend on the backend. |
If we are worried about minimal dependency we can parse the command line arguments ourselves. I find it a little surprising (the not using Google benchmark). |
Setting Benchmark seems a bit heavy. We only have a single benchmark currently using it ( |
benchmarks/union_find/union_find.cpp
Outdated
} | ||
bool allow_loops = !disallow_loops; | ||
|
||
printf("allow loops : %s\n", (allow_loops ? "yes" : "no")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still finds this confusing because if I set the parameter to true
, we output no
on the screen.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My perspective is that the default behavior without specifying the flag should be allowing the loops. Then, the boolean switch would be used to prohibit the loops. It is unclear to me how would one use a boolean switch in this context.
592362f
to
cf02c31
Compare
Rebased on master to include #799. |
cf02c31
to
a3a65a7
Compare
a3a65a7
to
76db3b0
Compare
This would allow to evaluate any changes in the union-find data structure.