Closing a three-year-old issue using Rust arenas

93 points by giacomo_cavalieri


val

also cutting its peak memory usage by a good 10%!

If this is a point you are looking to improve further, you can look into using a different arena which gives you opaque handles instead of references. The handles can be 16 or 32 bits long instead of 64, which can be significant when you have many small allocs (as it seems to be the case from your 10%).

According to https://donsz.nl/blog/arenas/ , the only crate to do that is compact_arena but it's easy to write your own if it doesn't fit your needs.