4 ms·
You can also use the typed-arena crate[0] or roll your own if you're feeling like cracking open unsafe. [0] https://crates.io/crates/typed-arena https://crates
by vvanders 6y ago
You can also use the typed-arena crate[0] or roll your own if you're feeling like cracking open unsafe.
[0] https://crates.io/crates/typed-arena https://crates.io/crates/typed-arena
- all-fakes 6y agoTyped-arena is a bit limited, because all the allocated values must be of the same type. bumpalo[0] removes that restriction, but it also doesn't run destructors, which can lead to memory and other resource leaks. Another worry I have with bumpalo is that I don't think it's been reviewed thoroughly for unsoundness. Still, bumpalo has been used to great effect in dodrio[1], a React-like library for Rust with really good performance. [0]: https://crates.io/crates/bumpalo https://crates.io/crates/bumpalo [1]: https://github.com/fitzgen/dodrio https://github.com/fitzgen/dodrio