Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Web
Expertise: Beginner
Oct 19, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Always Prefer to Use Local Variables

You should always prefer to use Local variables. Local variables reside within functions and subs. They have local scope and limited lifetime. These variables are compiled into numeric references and put in a table. Local variable references can be resolved at compile time.
Global variables, on the other hand are resolved at run time. Due to this, local variable access is many times faster than global variable access. Also, undimensioned global variables are very slow. Whenever an undimensioned global variable is used for the first time, the entire object model is searched for an object with that named property before a new one is created.
Deepak Pant
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date