Your CPU meter indicates an issue. All except one core are idle while the other cores are operating at full capacity. Despite the fact that your application is CPU-bound, you are only using a small portion of the multicore system's processing capability. Is it possible to improve performance?
Parallel programming, in a nutshell, is the solution. Where earlier you would have written the familiar to all programmers sequential code, you now discover that this does not fulfil your performance objectives. You must divide your application into concurrently running components in order to make effective use of the CPU resources on your machine. This is obviously easier said than done. The practice of parallel programming has a reputation for being a minefield of subtle, difficult-to-reproduce software flaws and the purview of experts. Everyone appears to have a favourite tale of a parallel programme that behaved strangely due to an unknown bug.
These tales ought to instil a healthy appreciation for the challenges you will encounter when creating your own parallel systems. Thankfully, assistance has arrived. A new parallel programming methodology is introduced by the Parallel Patterns Library (PPL) and the Asynchronous Agents Library, greatly simplifying the process. Complex algorithms are used in the background to dynamically distribute computations across multicore architectures. Debugging and analysis capabilities are also included in the Microsoft Visual Studio development system to support the new parallel programming approach.
Another resource is tested design patterns. The most significant and popular parallel programming patterns are covered in this tutorial, along with executable code examples written in PPL for each one. Reviewing the patterns in this book is a smart place to start when deciding where to start. Check to see whether any of the characteristics of your issue fit one of the six patterns described in the following chapters. If it does, examine the sample code and the pertinent pattern(s) in greater detail.