Collected sources and patterns will appear here. Add from search, explore, or the patterns library.
(Pointer, Tag) -> TaggedPointer
Pack a pointer and a small integer tag into a single machine word by utilizing the unused aligned bits of the pointer.
Problem it solves
Storing metadata alongside pointers introduces alignment padding and memory overhead in garbage-collected or syntax-tree nodes.
Consumes
Emits
The real projects this mechanism was found in. Attribution is the point — this is how the best teams actually do it.