How do you fit a character, a style, a width, and type safety into exactly 8 bytes? Claude Code uses bitfield surgery. We use phantom-tagged IDs and static_assert. Both compile to one cmp instruction.
Posts tagged “memory-layout” (2)
Every terminal UI, no matter how complex, reduces to filling a 2D grid of cells and diffing it against the previous frame. Claude Code uses a dual-view memory trick to make this fast. In C++, we don't need the trick.