Skip to content

Optimize star coloring and its postprocessing#171

Merged
gdalle merged 7 commits intomainfrom
postprocessing_star_set
Feb 12, 2025
Merged

Optimize star coloring and its postprocessing#171
gdalle merged 7 commits intomainfrom
postprocessing_star_set

Conversation

@amontoison
Copy link
Copy Markdown
Collaborator

  • Preallocate the number of entries (i.e., the number of edges) in the dictionary star.
  • Add a vector of integers nb_spokes to count the number of spokes for each star during the star coloring.
  • Use nb_spokes to know the size of each vector in spokes when creating a StarSet.
  • Restore the negative hubs in the trivial stars so that we can treat them after the "normal stars" during postprocessing.
  • Improve handling of trivial stars during postprocessing by checking if a vertex is already a hub in a different star.
  • Improve _update_stars! to minimize duplicated access in the dictionary star.

@amontoison amontoison added the benchmark Run benchmarks on PR label Feb 12, 2025
@amontoison amontoison requested a review from gdalle February 12, 2025 04:32
@github-actions

This comment was marked as outdated.

@amontoison
Copy link
Copy Markdown
Collaborator Author

amontoison commented Feb 12, 2025

@gdalle The failures are related to the decompression of bicoloring.
It should be related to the neutral color and the function postprocess! that I optimized.
I think that we neutralized some colors now with the random tests.

@gdalle gdalle removed the benchmark Run benchmarks on PR label Feb 12, 2025
Comment thread src/coloring.jl Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (7149c41) to head (d8bcb71).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #171   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines         1423      1447   +24     
=========================================
+ Hits          1423      1447   +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdalle gdalle merged commit 750be07 into main Feb 12, 2025
@gdalle gdalle deleted the postprocessing_star_set branch February 12, 2025 14:12
@amontoison
Copy link
Copy Markdown
Collaborator Author

The gain in terms of storage is between 24% and 67% for the star coloring.

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.

2 participants