Closed meooow25 closed 1 month ago
This isn't related to your changes, but it looks like the IntSet
validity test doesn't ensure that each Tip
contains at least one element.
@treeowl, anything I can do here?
I'm dealing with a family medical emergency this week. I hope to give this a final review shortly.
@treeowl I hope you are able to find time for this. I would really like to finish this work.
Yes, I'm so sorry about the delay. Problems continue on my end, but that's no reason to hold you up. Merged! Will you try the IntSet
now?
Thank you!
Will you try the
IntSet
now?
This was the IntSet
PR. Are you thinking of something else?
No, I'm just incredibly tired from what's been going on at home.
On Tue, Jun 4, 2024, 9:43 AM Soumik Sarkar @.***> wrote:
Thank you!
Will you try the IntSet now?
This was the IntSet PR. Are you thinking of something else?
— Reply to this email directly, view it on GitHub https://github.com/haskell/containers/pull/998#issuecomment-2147573834, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOOF7IFP3VXBJOJRKYWDLLZFXAAHAVCNFSM6AAAAABF2HCEOWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGU3TGOBTGQ . You are receiving this because you modified the open/close state.Message ID: @.***>
I hope things get better 🙂
Prefix
andMask
Int
fields in theBin
constructor with a singleInt
field which contains both merged together. This reduces the memory required by aBin
from 5 to 4 words, at the cost of more computations (which are cheap bitwise ops) being necessary for certains operations. This follows a similar change done forIntMap.Bin
(#995).IntSet
andIntMap
have been moved into aIntTreeCommons
module.Fixes #991.
Memory
Concretely, this reduces the memory required by an
IntSet
by ~12.5%.Calculations: For a tree with n
Tip
s, eachTip
s costs 3 words and there aren-1
Bin
s each costing 5 words before this change and 4 words after. So we save about 1 out of 8 words.Compatibility
This PR makes breaking changes to
IntSet
internals which is reflected in the exports of the internal moduleData.IntSet.Internal
. Due to the introduction ofIntTreeCommons
, some exports ofData.IntMap.Internal
are moved toIntTreeCommons
. There is no change in the exports of any other module.Benchmarks
Benchmarks done with GHC 9.6.3. Last updated: 080dde1
Benchmark command:
cabal run <target> -- --csv <csv> +RTS -T
intset-benchmarks
set-operations-intset