4 ms·
Normally if you have too much overhead with a channel, you just send more at a time. For example if you are using a channel to distribute out work, send 100 it
by reality_czech 11y ago
Normally if you have too much overhead with a channel, you just send more at a time. For example if you are using a channel to distribute out work, send 100 items at a time rather than 1. Then you do fewer channel read and write operations.
Concurrent maps have poor performance because of cache-line bouncing and locking overhead. Everyone I've ever talke to who has benchmarked them has said there isn't much point.