|
|
|
|
|
by koolba
846 days ago
|
|
It’s a bit of both. Been discussed here before quite a bit too: https://news.ycombinator.com/item?id=31619076 I love using it as an example of how implementing something so simple can lead to learning about so many seemingly unrelated things like context switches and memory alignment. |
|
That inefficiency is a far bigger sin than the "slowness" of yes needing a write() call for every line it emits, given the intended purpose of the command (which is not, as the code suggests, to saturate a unix pipe as fast as you can.)