Did you try any other fpc compiler optimisation settings? No expert, but
looks like it isn't too difficult for compiler to spot this.

What about llvm - (coming soon to fpc apparently) - would that fix it?

John


On 29 October 2013 13:22, Graeme Geldenhuys <gra...@geldenhuys.co.uk> wrote:

>  Hi,
>
> This is a very impressive little blog about efficient string concatenation
> in Delphi. But it also applies to Free Pascal.
>
>
> http://www.delphitools.info/2013/10/28/efficient-string-concatenation-in-delphi/
>
>
> I created two versions of the small test project and compiled it with FPC
> as follows.
>
>   $ fpc -O2 -al stringtest.pas
>   $ fpc -O2 -al stringtest2.pas
>
> 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. :)
>
> Regards,
>   - Graeme -
>
>
>
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to