Benefits of Concurrency
Concurrent programming can be used to improve performance, to create scalable and fault-tolerant systems, and to write clear and understandable programs for controlling real-world applications. The following are some of the reasons why this is true:
- Performance
-
Imagine you have two tasks:
A, which takes ten seconds to perform, andB, which takes fifteen seconds. On a single CPU doing both,AandBwill take twenty-five seconds. On a computer with two CPUs that operate independently, doingAandBwill take only fifteen seconds. To achieve this performance improvement, we have to write a concurrent program.Until recently, parallel computers were rare and expensive, but today multicore computers are commonplace. A top-end ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access