Skip to content

Introduce MixedBitSet#133891

Merged
bors merged 6 commits intorust-lang:masterfrom
nnethercote:MixedBitSet
Dec 9, 2024
Merged

Introduce MixedBitSet#133891
bors merged 6 commits intorust-lang:masterfrom
nnethercote:MixedBitSet

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

@nnethercote nnethercote commented Dec 5, 2024

ChunkedBitSet is good at avoiding excessive memory usage for programs with very large functgions where dataflow bitsets have very large domain sizes. But it's overly heavyweight for small bitsets, because any non-empty ChunkedBitSet takes up at least 256 bytes.

This PR introduces MixedBitSet, which is a simple bitset that uses BitSet for small/medium bitsets and ChunkedBitSet for large bitsets. It's a speed and memory usage win.

r? @Mark-Simulacrum

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants