<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 10 Oct 2012, at 14:31, <a href="mailto:dhkblaszyk@zeelandnet.nl">dhkblaszyk@zeelandnet.nl</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">Jonas and Sven... Endianess is indeed an issue I will be handling. It's<br>my understanding now that by storing data in a packed record I will have<br>the same behaviour (when it comes to aligning data in memory) over all<br>platforms and architectures. Same applies to packed objects. However<br>when objects have methods, does that change memory alignment (compared<br>to different architectures)? Is there any impact when I start using<br>object inheritance?<span class="Apple-converted-space"> </span><br></span></span></blockquote><div><br></div><div>You should never write objects containing VMTs to disk as a whole, that will only lead to trouble. Inheritance does not introduce VMTs in objects, but virtual methods, constructors and destructors do.</div></div><div><br></div><div><blockquote type="cite"><span class="Apple-style-span" style="font-family: monospace; ">One more</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">question, when using packed records, is there anything to say about</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">performance? Are there some tests anywhere that show how the performance</span><span class="Apple-style-span" style="font-family: monospace; "><br></span><span class="Apple-style-span" style="font-family: monospace; ">is impacted?</span><span class="Apple-style-span" style="font-family: monospace; "> </span><span class="Apple-style-span" style="font-family: monospace; "><br></span></blockquote></div><div><br></div><div>It will depend on the target platform, the order of the fields and types of the fields. It is impossible to say in general what the impact will be. It can be very large or non-existent.</div><div><br></div><div><br></div><div>Jonas</div></body></html>