WOLFRAM

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:

In[1]:=1
Out[1]=1
  • 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:

In[4]:=4

Using Parallelize...

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

In[5]:=5
Out[5]=5
Notes
If an expression is not parallelizable, it will be run sequentially.
In[6]:=6
Out[6]=6
Parallel computations are not currently supported on mobile devices or in the cloud and will instead be run sequentially.