[fpc-pascal] Not specifying the {$H+} degrades performance

Graeme Geldenhuys graemeg.lists at gmail.com
Mon Mar 26 14:13:54 CEST 2007


Ah, I see... Thanks for the quick reply.

Graeme.


On 3/26/07, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> On 26 mrt 2007, at 12:54, Graeme Geldenhuys wrote:
>
> > If I have a .pas unit and forgot to specify the compiler mode line
> >   {$mode objfpc}{$H+}
> > what does FPC default to? Compiler Mode? Longstring or Shortstring?
>
> Shortstring. {$h+} is not longstring, but ansistring.
>
> > After some more testing I realized it is the {$H+} that gave me the
> > performance boost.  What does FPC default to? Why not default to {$H+}
> > ?
>
> Backwards compatibility. There are also many situations where
> ansistrings are slower than shortstrings.
>
>
> Jonas



More information about the fpc-pascal mailing list