Why is console output so slow?
So I have noticed this while using a few differnt languages on Windows XP, Vista and 7. If you dump a couple thousand lines a second to the console window it generally has a negative impact on the performance of the system. Computer are f开发者_运维百科ast, and always faster, and the console looks like just some text on a back ground. Where is the bottle neck?
printf etc has to go from your process with some sort of IPC to the Console window process (csrss or conhost) The console can also be shared with several processes so there is also some synchronization and buffering going on.
精彩评论