[fpc-pascal] Mozilla XPCOM
Marcos Douglas
md at delfire.net
Mon Jun 7 18:56:30 CEST 2010
On Mon, Jun 7, 2010 at 12:11 PM, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
> 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.
In others words, the compiler choice, right?
>> 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.
Even variable different of string?
Marcos Douglas
More information about the fpc-pascal
mailing list