1.. _Automatic_Chunking:
2
3Automatic Chunking
4==================
5
6
7A parallel loop construct incurs overhead cost for every chunk of work
8that it schedules. |full_name|
9chooses chunk sizes automatically, depending upon load balancing
10needs. The heuristic attempts to limit overheads while
11still providing ample opportunities for load balancing.
12
13
14.. CAUTION::
15   Typically a loop needs to take at least a million clock cycles to
16   make it worth using ``parallel_for``. For example, a loop that takes
17   at least 500 microseconds on a 2 GHz processor might benefit from
18   ``parallel_for``.
19
20
21The default automatic chunking is recommended for most uses. As with
22most heuristics, however, there are situations where controlling the
23chunk size more precisely might yield better performance.
24