Hacker News new | ask | show | jobs
by throw-qqqqq 28 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.

1 comments

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.