[fpc-pascal] Mozilla XPCOM
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jun 7 17:11:08 CEST 2010
On 07 Jun 2010, at 16:59, Marcos Douglas wrote:
> Well... just to I will know. A long time ago (Delphi 4) I learned:
> Always use 'const' for 'strings' because this is faster. Strings will
> be passed by reference.
It can be faster to pass very short strings by value instead of by
reference. That's why "const" does not specify how a parameter is
passed.
> This remains true?
What you can count on is that a "const" parameter should never be
slower than a regular value parameter. How exactly it is implemented
is however something you have no control over.
Jonas
More information about the fpc-pascal
mailing list