cpp-terminal icon indicating copy to clipboard operation
cpp-terminal copied to clipboard

improve the rendering performance

Open MCWertGaming opened this issue 2 years ago • 1 comments

We should look into ways on improving the printing performance for the windows console. things to look into:

  • [ ] using cerr as it's unbuffered (needs testing)
  • [ ] desabling automatic flushing of the output buffer https://en.cppreference.com/w/cpp/io/manip/unitbuf
  • [ ] https://usaco.guide/general/fast-io?lang=cpp speeding up cin / cout

MCWertGaming avatar Aug 23 '22 22:08 MCWertGaming

Maybe we should avoid to use cerr for this purpose at least from the library. The user would maybe (I would ;) ) have a way to detach cerr and send into file or whatever...

But we could try to make cout unbufered by default and add a nice way to turn it on or off depending on the user wishes

For the third option it can be dangerous for a library ( the user would expect ) cstdio and C++ I/O to be synchronised but we could maybe give that option to the user if he knows what are the consequences.

flagarde avatar Aug 24 '22 08:08 flagarde