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

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Mar 26 12:58:17 CEST 2007

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.


More information about the fpc-pascal mailing list