4 ms·
The amount of work you send should significantly exceed the costs of sending it. Jerf, you did it again! This is gold! Succinct and to the point. I'm going to
by stcredzero 5y ago
The amount of work you send should significantly exceed the costs of sending it.
Jerf, you did it again! This is gold! Succinct and to the point.
I'm going to think on this one.
- karmakaze 5y agoThis implies that you know the "costs of sending it."
- jerf 5y agoFor channels and other things in the local OS process, you should have a good idea. Give or take being in major swap problems, etc., but I think of that as an "already lost" situation; at that point the problem isn't the expense of moving things between threads or local processes anyhow. When you get out into discussing network matters, it gets a lot fuzzier. You may "know" that you're only .025ms away from something in some specific system, but your TCP-based API doesn't necessarily "know" that and will happily use the exact same code to do something that takes 4 orders of magnitude larger. That's enough difference to be problematic.
- karmakaze 5y ago'Send'ing things via a Go channel is all in the same process, between goroutines (sometimes between threads).