generational-arena icon indicating copy to clipboard operation
generational-arena copied to clipboard

Add `shrink_to_fit`

Open Kestrer opened this issue 5 years ago • 4 comments

Closes #19. I didn't implement shrink_to since it is unstable.

I also simplified the implementation of clear, since I noticed it was possible; there are a few other minor changes from rustfmt too.

Kestrer avatar Jun 13 '20 17:06 Kestrer

Any chance this will land? It makes a huge difference to memory usage.

s1341 avatar Sep 13 '21 14:09 s1341

This needs a rebase, and I'd also feel more confident in the correctness of the free list handling if shrink_to_fit were integrated into the quickchecks. Happy to merge when those things happen.

fitzgen avatar Sep 13 '21 22:09 fitzgen

I can manage the rebase, but need guidance regarding to the 'quickchecks'. What are they? Where are they?

s1341 avatar Sep 14 '21 05:09 s1341

Here you go:

https://github.com/fitzgen/generational-arena/blob/master/tests/quickchecks.rs

https://docs.rs/quickcheck/1.0.3/quickcheck/

fitzgen avatar Sep 14 '21 18:09 fitzgen