Board index » delphi » Assign string property before repeated read?

Assign string property before repeated read?

Hi,

If I'll be accessing an edit box's Text property often in a program,
would it be better (faster, more efficient) to assign it to a String
first and access the String? Is there some time overhead to accessing a
property rather than a variable?

Thanks in advance,
Robert.

 

Re:Assign string property before repeated read?


Quote
>If I'll be accessing an edit box's Text property often in a program,
>would it be better (faster, more efficient) to assign it to a String
>first and access the String?

Absolutly

Quote
>Is there some time overhead to accessing a
>property rather than a variable?

Yes, "Properties" do not exist. To access the value of some prop. compiler
would call the Geter function
takes time.

Other Threads