I use using declarations more than using the explicit std::
way for using the standard library objects. I got this question of whether is there any performance increase with using using declarations, using declaratives and using names directly from the standard library.
For instance:
To print out "Hello world" we can write the following ways:
By using the bare
std::
way:std::cout << "Hello world";
By using using declaration:
using std::cout; cout << "Hello world";
By using using declarative:
using namespace std; cout << "Hello world";
So, Which of the above methods has the best perfomance? and more efficient?