Memory Optimization
| Lesson overview |
Lesson overview
Topics covered: cache locality, struct padding, alignment, packing attributes.
Memory Optimization
Cache locality: access patterns that match cache line size
Struct padding/alignment: #pragma pack, alignment attributes
Packed structs: __attribute__((packed)) to reduce size
Bit fields: struct members sharing bits
Article author: Arthur Isaev