QB64.org Forum
QB64 Team Software => InForm Discussion => Topic started by: Qwerkey on September 03, 2018, 01:21:15 pm
-
When a program is running and has to use the property of a control eg
IF Control(AllowCollisionsCB).Value THEN
is this slower than
IF Variable` then
where previously we took Variable` = Control(AllowCollisionsCB).Value ?
I imagine the answer is that the first method is not slower than the second as Control(AllowCollisionsCB).Value is just a variable inside a TYPE.
I ask because in some places I am accessing Control(AllowCollisionsCB).Value and other control properties many thousands of times a second.
Richard
-
It may be slightly faster, although very likely imperceptible.
However, you'd have to assign the control's property to the variable in the loop anyway; sounds unnecessary.