<div dir="ltr"><div class="gmail_default" style="font-family:courier new,monospace"><span style="font-family:arial">2014-11-03 14:39 GMT+08:00 Sven Barth </span><span dir="ltr" style="font-family:arial"><<a href="mailto:pascaldragon@googlemail.com" target="_blank">pascaldragon@googlemail.com</a>></span><span style="font-family:arial">:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Would you mind to show the timings that you got for FillChar? :)</blockquote><div><br></div><div><div class="gmail_default" style="font-family:'courier new',monospace">Using FillChar is always about 5% (or less) faster than FillQWord when used with GetMemory, but will be around 20%-40% faster if the memory is allocated by SetLength.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Additionally this switch won't help you. The memory buffer that is allocated by SetLength is also allocated using GetMemory. So the buffer itself *is* aligned. But you don't get the start byte of the buffer in case of SetLength, but the first byte after the information record which might not be aligned correctly and *no* compiler switch will help you with that.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:'courier new',monospace;display:inline">Then the problem remains with SetLength vs. GetMemory... Why SetLength is about 10000x (!) slower than GetMemory?</div> </div><div><br></div><div><div class="gmail_default" style="font-family:'courier new',monospace">allocating 1G memory took about 0.1 second by SetLength, but is about 1E-5 via GetMemory.</div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div><div class="gmail_default" style="font-family:'courier new',monospace"><br></div></div></div></div></div>