Parallelism

Get familiarized with the basic concepts of parallelism.

We'll cover the following...

What is parallelism?

Most modern microprocessors consist of more than one core, each of which can operate as an individual processing unit. They can execute different parts of different programs at the same time. The features of the std.parallelism module make it possible for programs to take advantage of all of the cores in order to run faster.

This chapter covers the following range algorithms. These algorithms should be used only when the operations that are to be executed in parallel are truly independent from each other. “In parallel” means that operations are executed on multiple cores at the same time:

  • parallel: Accesses the elements of a range in parallel

  • task: Creates tasks that are executed in parallel

  • asyncBuf: Iterates the elements of an ...