Hacker News
points by emtel 5 days ago | 0 comments
I’m not sure how applicable this is today. It is quite hard to beat jemalloc, especially for small allocations, which it handles essentially the same way a hand coded pool or arena would anyway.
[–] throw-qqqqq 5 days ago
If using 32bit handles, you save 4 bytes per reference compared to pointers. If your application uses a lot of references, this can add up (in total memory use).

I have a few applications with lots of tree structures, where this makes a meaningful difference.

[–] lomereiter 5 days ago
It's not just memory savings, it's also about CPU cache. A frequently accessed tree/graph-like data structure can fit into L2/L3 cache so much easier if it uses 32-bit offsets instead of pointers.
[–] ex-aws-dude 5 days ago
I’ve worked on game engines and what he’s describing is still very common

I don’t know about outside that world though

[–] ex-aws-dude 4 days ago
Also something not discussed is that you kind of want handles anyway for serializing objects that reference eachother