I have two questions:
Is two calls to std::cout less efficient than one?
If yes, does the compiler (usually) optimize it and generate equal assembly for the three cases shown below?
For example:
std::cout << "a" << "b";
or
std::cout << "ab";
or
std::cout << "a";
std::cout << "b";
I ask, because I think the last one is the most readable for a longer list of text to output.
Aucun commentaire:
Enregistrer un commentaire