Where possible, sample code has been provided to illustrate the point. Performance might not noticeably improve unless accessing data is a significant part of your application processing. The suggestions in this paper comprise good coding practice. However, if your goal is to improve the speed of an existing application, you should start by profiling and analyzing your application. This document describes general guidelines for improving your application performance.
Some suggestions work only under certain circumstances.
Where possible, such constraints have been called out. After you implement a change suggested in this document, you should measure your application performance to validate benefits. Some modifications could be detrimental to your application performance if they are inappropriate for your application scenario. The code in the StronglyTyped subroutine below uses vtable binding. Because in the NotStronglyTyped subroutine the type of the Connection variable isn t known at compile time, the generated code dynamically gets the information to invoke the function at run time by using IDispatch , which is much slower.