News for hackers. Stuff that matters.
Re:Writing memory efficient C structs by ryao on Wednesday July 30, 2025 @06:56PM (#44740505)
If you are using an intrusive data structure, keeping the key on the same cache line as the pointers can make traversals faster. Reducing padding can make this easier to do.

In general, keeping commonly accessed together things on the same cache line is a good idea and the work needed to remove excessive padding overlaps with the work needed to do this.

There are no comments on this comment yet.