Take the 2-minute tour ×

Visual Studio will automatically create using statements for you whenever you create a new page or project. Some of these you will never use.

Visual Studio has the useful feature to "remove unused usings".

I wonder if there is any negative effect on program performance if the using statements which are never accessed, remain mentioned at the top of the file.

share|improve this question
I did search for it before asking, and it didn't show up. –  KdgDev Jul 22 '09 at 8:36
FWIW, this posting has better SEO: it was the first result in Google for me. Of the 2 originals linked, one is unavailable (removed) and the other is worded differently enough to add some value to this post, even if just as a redirection. –  DaveD Nov 2 '12 at 19:07

5 Answers 5

up vote 30 down vote accepted

An unused using has no impact to the runtime performance of your application.

It can affect the performance of the IDE and the overall compilation phase. The reason why is that it creates an additional namespace in which name resolution must occur. However these tend to be minor and shouldn't have a noticeable impact on your IDE experience for most scenarios.

It can also affect the performance of evaluating expressions in the debugger for the same reasons.

share|improve this answer
The more usings there are, the slower Intellisense will be –  Heliac Jul 13 '12 at 7:07

No, it's just a compile-time/coding style thing. .NET binaries use fully qualified names under the hood.

share|improve this answer
Does this mean that longer class and method names have a small but actual (if immeasurable) impact on JIT compilation times? –  Jared Updike May 5 '10 at 23:08

No effect on execution speed, but there may be some slight effect on compilation speed/intellisense as there are more potential namespaces to search for the proper class. I wouldn't worry too much about it, but you can use the Organize Usings menu item to remove and sort the using statements.

share|improve this answer

No, there are several process involved when compiling a program. When the compiler start looking for references (classes, methods) it will use only the ones used on the code. The using directive only tells the compiler where to look. A lot of unused using statement could maybe have a performance issue but just at compile time. At runtime, all the outside code is properly linked or included as part of the binary.

share|improve this answer

Code that does not execute does not affect the performance of a program.

share|improve this answer

Your Answer


