dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Apr 6, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Convert Static Variables for More Speed

Referencing a static local variable in a procedure is two to three times slower than a regular local, dynamic variable. If your procedure demands every last bit of speed possible, convert all static variables into module-level variables.

However, this approach has a nasty design implication—the procedure becomes less self-contained. You must remember to copy and paste the module-level variable when you reuse the procedure in another project. But this approach might make sense in an extremely intense routine. Further, referencing a variable declared at module level is faster than referencing a global variable declared in a separate BAS module. If you don't need to share a variable among all of an app's forms and modules, you should declare it in the only form or module that uses it.

Jai Bardhan
 
Comment and Contribute

 

 

 

 

 


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

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date