2 ms·
Is it faster? The design proposed deliberately withholds fast results in order to ensure they're printed in sequence. Anybody who has ever run "traceroute" know
by tptacek 2y ago
Is it faster? The design proposed deliberately withholds fast results in order to ensure they're printed in sequence. Anybody who has ever run "traceroute" knows what this UX is like. If I wasn't going full TUI, I would just print the results as they come in, on stderr (with an index number).
A sync.WaitGroup is as fast as the proposed behavior, for what it's worth, and doesn't have the ordering complexity.
- skywhopper 2y agoDude, just accept the premise of the article. He gives the requirements: Execute in parallel, print in order as quickly as possible. That’s the premise. The point of the article is in how to achieve that, not whether you should. “Print as soon as possible and ignore ordering” is not a challenge nor an interesting topic to write an article about.
- kaashif 2y agoYeah, this is funny. It's like presenting someone with a thought experiment and them saying "yeah but that would never happen".