<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>On 11 okt '12, Jonas Maebe wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%">
<div>
<div>As mentioned before, it not only depends on the platform, but also on the contents of the object/record. E.g., a badly misaligned double will generally give much worse performance even on Intel.</div>
<br />
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; 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;">This makes me wonder if<br />choosing a proper value for $PACKRECORDS could make my file readable<br />safely on all platforms, only needing to convert the endianess if<br />applicable. This would not force me to do manual padding in my structs.<br />Say I use a value of 16 would that cover all ABI's FPC currently<br />supports?<span class="Apple-converted-space"> </span><br /></span></span></blockquote>
<div>Yes.</div>
</div>
</blockquote>
<p>So misalignment of for instance a double (or whatever type) will only happen if the record is packed and the packed value is smaller than what the ABI prescribes, correct?</p>
<p> </p>
<p>Let's assume I set the record to packed 16bytes, this would make reading and writing records as a whole safe on all platform/architecture combinations right? Apart from a few padding bytes, what are the performance penalties of doing this then? Why would there be penalties?</p>
<p>Darius</p>
</body></html>