logoalt Hacker News

jeltzlast Sunday at 3:55 PM2 repliesview on HN

For those problems arena allocators tend to perform even better.


Replies

mbrocklast Sunday at 4:09 PM

Yeah, but if you actually need to retain a live subgraph of the allocated heap, the arena can't help you. So you make an arena allocator that only frees its slab after moving out the reachable set to a new compacted arena. Congratulations, you've implemented a Cheney-style compacting GC!

quotemstrlast Sunday at 4:17 PM

Not for all allocation patterns. It's hard to beat bump pointer allocation and escape analysis in general.