2 ms·
> Interesting that the pipeline is the fastest! I would expect the sheer number of separate processes to slow things down considerably, but apparently it doesn'
by hnlmorg 3y ago
> Interesting that the pipeline is the fastest! I would expect the sheer number of separate processes to slow things down considerably, but apparently it doesn't really matter. Probably because the first `grep` already filters out most of the dictionary, so there isn't a lot of I/O through the pipes.
The IO doesn’t matter so much because they’re done in parallel. Whereas the other examples have to filter each word throw the entirety of their steps before they can proceed onto the next word.