Mail Archives: djgpp/1995/05/08/05:14:06
> IE: I want to 'pack' for space considerations and 'unpack' for speed.
> ... or ... would I need _two_ different arrays and move bytes between
> (slow and defeats any 'gains') ... (No sparse MAT code please ;> ).
In most cases, unless you have HUGE arrays of such structures, or have to
process the structure in the innermost hottest loop, these considerations
never apply. So I would say, if you have to match a struct to some external
item (like a disk file or hardware device), use __attribute__((packed)). At
least this documents that something unusual is going on.
- Raw text -