Run a Parallel Computation

Take advantage of multicore computers by running compute-intensive computations on multiple kernels.

Using ParallelTable...

Use ParallelTable to parallelize a Table computation. For example, evaluate $ProcessID on parallel kernels, returning the process ID of each kernel:

Click for copyable input
  • The number of kernels available for parallel computation typically corresponds to the number of CPU cores.
  • A parallel computation may run more slowly than the non-parallel version if the computation takes less time than the overhead of parallelization.

On a multicore CPU, ParallelTable may run significantly faster than Table:

Using ParallelMap...

Use ParallelMap to parallelize a Map computation. For example, identify the images on the Wikipedia page on dogs:

Click for copyable input

Using Parallelize...

Some expressions can be automatically evaluated on parallel kernels using Parallelize:

Click for copyable input
If an expression is not parallelizable, it will be run sequentially.
Click for copyable input
Parallel computations are not currently supported on mobile devices or in the cloud and will instead be run sequentially.