Look into using `WriteConsoleOutput` Windows API. Sample code on Stack Overflow: [How can I write fast colored output to Console?](https://stackoverflow.com/a/2754674) Similarly, writing ANSI escape sequences may be faster on *nix.