4 ms·
> Concurrency is also not more efficient on a single core. This isn't a hard and fast rule. There is overhead to parallelism.
by nkozyra 10y ago
> Concurrency is also not more efficient on a single core.
This isn't a hard and fast rule. There is overhead to parallelism.
- tbrownaw 10y agoAnd if you step out all the parallelism from your concurrency runtime, you get rid of a big chunk of the overhead. But even with purely cooperative single-threaded multitasking, there's still some overhead vs "ordinary" strictly serial code.
- TickleSteve 10y agoFor CPU bound code, concurrency is pure overhead. For I/O bound code, concurrency can give you some benefit. ...but in general, people do not analyse this before throwing tasks at a problem.
- srean 10y ago> ...but in general, people do not analyse this before throwing tasks at a problem. Would that be just anecdotal ?
- TickleSteve 10y agoyes... in ~25 years in the business, over ~10 companies. ..and I can tell you that precisely none of them performed a correct analysis of a systems concurrency needs before 'designing' it. A common artifact of this is far too many tasks.
- srean 10y agoI have seen egregious abuse of pre-emptive threads ... a lot. Abuse of green threads / fibres / coroutines ... not so much. I think one has to be a half decent programmer to be even aware those options.