7 ms·
The problem is, who on earth would have thought of printing to terminal would have a big penalty?
by yeukhon 13y ago
The problem is, who on earth would have thought of printing to terminal would have a big penalty?
- vehementi 13y agoI've run into it before... I've had compiling etc. limited by the speed & size of my console window. Isn't it common knowledge though? Cat some 1GB file to your terminal and notice it takes more than the <100ms it takes to cat it to /dev/null.
- cabinpark 13y agoNever assume something is common knowledge! I've seen many links to mathematics things here on HN that I would consider "common knowledge" yet many people were unaware of them.
- agumonkey 13y agoYou also realize it when adding 'quiet' to the bootloard kernel params. No output => boot time decreased (sometimes halved)
- est 13y ago> who on earth would have thought of Everyone with >5 years of printf() debugging experience.
- zaphar 13y agoI remember minimizing the terminal window to make a script run faster. Taking the text rendering out of the execution path actually had a substantial speedup for long running scripts in some cases. It was one of those things you sort of picked up from other people along the way and assumed everyone knew. Nowadays I don't know if the difference is noticeable enough to be common knowledge though.
- walljm 13y agoI still have to think about it when i'm piping debug statements to a log... Conditional breakpoints are a similar case.
- yusukeshinyama 13y agoWhen you're using GNU screen or tmux, you notice that the CPU usage of these processes is sometimes notable. Here's another way to increase your CPU load with apparently doing nothing: $ cat /dev/zero