Optimal struct layout template?

BCS ao at pathlink.com
Mon Dec 15 00:53:45 PST 2008


Reply to Andrei,

> BCS wrote:
> 
>> would "align 1" work?
>> 
> That could make things excruciatingly slow. What's really needed is
> (in first approximation) to sort the members in decreasing order of
> size. Odd-sized arrays of char foil this plan to some extent, which is
> where the fun begins.
> 
> Andrei
> 

??

http://en.wikipedia.org/wiki/Bin_packing_problem





More information about the Digitalmars-d mailing list