Performance of C++ streams