For example, in C#
Is
using System.X;
using System.Y;
using System.Z;
by any means slower than
using System.X
, even if the program only uses System.X
?
And, if they doesn't matter, is it a better practice to include all the libraries that you would possibly use, or only those that are used in your code?
It depends what you mean by efficiency
.
If you mean will it slow down my application at runtime, then no. Using directives are only used at compile time.
If you mean will it slow down my build step, then potentially it may take an extra few milliseconds if you have thousands of using directives in your file. But realistically no.
So.... wait for it.... no.