[fpc-pascal] Mozilla XPCOM

Marcos Douglas md at delfire.net
Tue Jun 8 18:50:15 CEST 2010


On Tue, Jun 8, 2010 at 12:55 PM, Luiz Americo Pereira Camara
<luizmed at oi.com.br> wrote:
> Marcos Douglas escreveu:
>>
>> Hi Luiz,
>>
>> On Mon, Jun 7, 2010 at 10:35 PM, Luiz Americo Pereira Camara
>> <luizmed at oi.com.br> wrote:
>>
>>>
>>> Take a look at
>>>
>>> http://lazarusroad.blogspot.com/2008/11/effect-of-using-constant-parameter-for.html
>>>
>>>
>>
>> Then, this continue true how I said in other mail:
>>
>> On Mon, Jun 7, 2010 at 11:59 AM, Marcos Douglas <md at delfire.net> wrote:
>>
>>>
>>> Always use 'const' for 'strings' because this is faster. Strings will
>>> be passed by reference.
>>>
>>
>> And about not string types, is more faster too? eg: foo (const i: Integer)
>>
>
> No. I did this test too. Double should also benefit but the generated
> assembler is equal with or without const.

Exactly.
Therefore I always used 'const' only at 'strings' params. I thought it
had changed, but not.  ;-)


Marcos Dougla



More information about the fpc-pascal mailing list