Author Topic: Mastering InForm: Are Control Properties Slower to Access than Variables?  (Read 20184 times)

0 Members and 1 Guest are viewing this topic.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
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

FellippeHeitor

  • Guest
Re: Mastering InForm: Are Control Properties Slower to Access than Variables?
« Reply #1 on: September 03, 2018, 01:24:45 pm »
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.