Optimal struct layout template?

dsimcha dsimcha at yahoo.com
Mon Dec 15 06:41:01 PST 2008

== Quote from BCS (ao at pathlink.com)'s article
> >
> ??
> http://en.wikipedia.org/wiki/Bin_packing_problem

Yes, but most structs are small enough that the asymptotic complexity really isn't
important.  For structs of maybe 4 or less elements, trying every possible
permutation in O(N!) seems perfectly reasonable to me.  For larger structs, using
heuristics might be necessary.

More information about the Digitalmars-d mailing list