Jonas Maebe wrote:
>
> On 06 May 2010, at 16:43, Bihar Anwar wrote:
>
>> If I remember this correctly, I've formerly ever read somewhere (in
>> my Delphi days) that array should be declared globally (not inside a
>> function or procedure) so that access to the array will be faster. Is
>> this correct?
> No.
That's a brief answer. How is what he is saying not true ?

A global variable can be allocated in the datasegment, meaning that the
compiler knows at comiletime what address to look for. If you allocate
things dynamically then you need to follow an extra pointer, so placing
an array in the datasegment would indeed speed up things afaik ? If not,
more than a blunt 'no' would be appreciated,

With kind regards,

-- 
http://werner.yellowcouch.org/


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to