Skip to content

Propagate arbitrary integer types as indices#222

Merged
gdalle merged 12 commits intomainfrom
gd/int
Apr 2, 2025
Merged

Propagate arbitrary integer types as indices#222
gdalle merged 12 commits intomainfrom
gd/int

Conversation

@gdalle
Copy link
Copy Markdown
Member

@gdalle gdalle commented Apr 1, 2025

The idea is that if we propagate integer types carefully, we could store all indices in Int32 whenever that is enough, leading to a 2x reduction of memory footprint.

Caveats:

  • Just because an integer type T is able to store the vector of colors doesn't mean it is able to store every vertex.
  • As a result, I use separate integer types for indices (often called T1) and colors (often called T2)

Still a draft, don't merge yet because I fear this might make some existing code error. Also needs tests on Int32 indices.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (87fd1b3) to head (a10ec10).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #222   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         1716      1720    +4     
=========================================
+ Hits          1716      1720    +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gdalle gdalle requested a review from amontoison April 2, 2025 11:47
@gdalle gdalle marked this pull request as ready for review April 2, 2025 14:11
Comment thread src/coloring.jl Outdated
Co-authored-by: Alexis Montoison <35051714+amontoison@users.noreply.github.com>
Comment thread src/graph.jl Outdated
gdalle and others added 4 commits April 2, 2025 17:44
Co-authored-by: Alexis Montoison <35051714+amontoison@users.noreply.github.com>
@gdalle gdalle merged commit 2ab1c47 into main Apr 2, 2025
6 checks passed
@amontoison amontoison deleted the gd/int branch April 2, 2025 16:45
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