heapless icon indicating copy to clipboard operation
heapless copied to clipboard

WIP/RFC: shift_remove and friends

Open prutschman opened this issue 7 months ago • 1 comments

Per #557, I took a stab at implementing the shift_remove_* family of functions from upstream IndexMap. I'm sure there's better ways to do the things I did; there are some todo's around exactly how to do the fixup after removing from entries. I factored out the re-calculation logic from .retain, but recalculating everything is probably overly conservative.

Also, you may not even want these API functions. No worries if so! But if you're interested, I'm happy to make changes or re-do things.

prutschman avatar Apr 24 '25 23:04 prutschman

The removal logic is still bad. I'm adding additional tests that verify that the map is fully internally consistent: every entry can be found, every index points to an entry consistent with the hash value, and the number of entries and non-empty indices is the same.

prutschman avatar Apr 26 '25 17:04 prutschman