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

🎨 Slightly faster ClusterComplete #664

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

wlambooy
Copy link
Collaborator

Description

The main goal of this PR was to re-introduce the original ClusterComplete unfolding, only to run when running on a single thread. After a lot of benchmarking, it was found, however, that the runtime improvement---somehow---is absolutely marginal. Apparently the overhead from the threading is not too great, which is also good news in a way. In the process, I found one deep copy that was performed twice in one statement (clustering_state_for_thieves = sidb_clustering_state{clustering_state}; performed a copy construction and then a copy assignment).

Unfortunately, this PR does not deserve the ⚡ label, so 🎨 is more appropriate.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have added a changelog entry.
  • I have created/adjusted the Python bindings for any new or updated functionality.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.38%. Comparing base (7508036) to head (b531dcb).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #664   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files         254      254           
  Lines       41149    41202   +53     
  Branches     1870     1878    +8     
=======================================
+ Hits        40485    40538   +53     
  Misses        664      664           
Files with missing lines Coverage Δ
...ion/algorithms/simulation/sidb/clustercomplete.hpp 99.32% <100.00%> (+0.05%) ⬆️
...lude/fiction/technology/sidb_cluster_hierarchy.hpp 99.59% <ø> (+0.01%) ⬆️
...est/algorithms/simulation/sidb/clustercomplete.cpp 99.69% <100.00%> (+<0.01%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 947d6f1...b531dcb. Read the comment docs.

Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@Drewniok Drewniok added the enhancement New feature or request label Feb 16, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@wlambooy
Copy link
Collaborator Author

The latest commit fixes an issue in setting the parameters that made it so that the validity witness parameters were both set to 0 for the single-threaded benchmark. Now there is a slight runtime improvement observable, although it is not significant (~2%).

@wlambooy wlambooy requested a review from Drewniok February 17, 2025 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants