Parallelization
✖
Parallelization
is an option for Compile that specifies whether it should create a compiled function that could run in parallel.
Details

- Parallelization applies to the execution of the compiled function.
- Compiled functions only run in parallel if Listable is one of the RuntimeAttributes and the function threads over list arguments.
- Compiled functions run in parallel using multiple threads of execution.
- Typically, $ProcessorCount is used to determine how many threads are used.
- If a compiled function running in parallel has several threads trying to call ordinary Wolfram Language code, only one thread can do this at any time.
- The following settings can be used:
-
True create parallel code False create single-thread code Automatic use parallelization for optimal arguments
Examples
Basic Examples (1)Summary of the most common use cases
Listable compiled functions can execute in parallel:

https://wolfram.com/xid/0mk89pjw6rf2-hv8mo4

This shows the operation running sequentially:

https://wolfram.com/xid/0mk89pjw6rf2-g974g6

Typically, $ProcessorCount is used to determine how many threads can be used:

https://wolfram.com/xid/0mk89pjw6rf2-bo7f4z

Wolfram Research (2010), Parallelization, Wolfram Language function, https://reference.wolfram.com/language/ref/Parallelization.html.
Text
Wolfram Research (2010), Parallelization, Wolfram Language function, https://reference.wolfram.com/language/ref/Parallelization.html.
Wolfram Research (2010), Parallelization, Wolfram Language function, https://reference.wolfram.com/language/ref/Parallelization.html.
CMS
Wolfram Language. 2010. "Parallelization." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Parallelization.html.
Wolfram Language. 2010. "Parallelization." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Parallelization.html.
APA
Wolfram Language. (2010). Parallelization. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Parallelization.html
Wolfram Language. (2010). Parallelization. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Parallelization.html
BibTeX
@misc{reference.wolfram_2025_parallelization, author="Wolfram Research", title="{Parallelization}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/Parallelization.html}", note=[Accessed: 18-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_parallelization, organization={Wolfram Research}, title={Parallelization}, year={2010}, url={https://reference.wolfram.com/language/ref/Parallelization.html}, note=[Accessed: 18-June-2025
]}