<div dir="ltr">Did you try any other fpc compiler optimisation settings? No expert, but looks like it isn't too difficult for compiler to spot this. <div><br></div><div>What about llvm - (coming soon to fpc apparently) - would that fix it? <div>
<br></div><div>John  </div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 29 October 2013 13:22, Graeme Geldenhuys <span dir="ltr"><<a href="mailto:graeme@geldenhuys.co.uk" target="_blank">graeme@geldenhuys.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div>Hi,</div><div><br></div><div>This is a very impressive little blog about efficient string concatenation in Delphi. But it also applies to Free Pascal.</div><div><br></div><div>     <a href="http://www.delphitools.info/2013/10/28/efficient-string-concatenation-in-delphi/" target="_blank">http://www.delphitools.info/2013/10/28/efficient-string-concatenation-in-delphi/</a> </div>
<div><br></div><div>I created two versions of the small test project and compiled it with FPC as follows.</div><div><br></div><div>  $ fpc -O2 -al stringtest.pas</div><div>  $ fpc -O2 -al stringtest2.pas</div><div><br></div>
<div>Then compared the two *.s assembler files. As the blog mentions, the "stupid looking" version generates a heck of a lot less ASM code. Umm. :)</div><div> </div><div>Regards,<div>  - Graeme -</div><div><br></div>
<br></div><div> </div> 
</div>
<br>_______________________________________________<br>
fpc-pascal maillist  -  <a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br></blockquote></div><br></div>