|
Fisher, Don wrote:
Sounds reasonable. So how much space am I wasting by forcing the fields to be contiguous? How much impact does this have on performance?
Actually, the system really isn't that smart in laying out the fields. Generally, it appears that fields are laid out in alphabetical order. That is, in the order that the compiler declares them in the W-Code. But as a rule, (as already stated) don't count on any specific ordering, because there seems to be some significant exceptions to the alphabetical ordering, not to mention alignment considerations. In other words, any slight change can throw any expected arrangement out of whack. If you absolutely need two fields to be contiguous in storage, then declare them as subfields. How much space is being wasted? Taking alignment considerations into account, the overhead on average is probably just a couple of bytes per standalone field or data structure. Cheers! Hans
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.