Parallel Execution (multi-cpu)

If your computer has more than one cpu or is a multi-core processor, many scalar dyadic functions (÷ ≥ = ≤ ⍟ | ! ○ ∨ ∧) now execute in parallel in separate system threads each running on a separate cpu or core, when the argument size exceeds a configurable limit, the parallel execution threshold.

For example, by default if you have a 4-cpu computer and execute an expression such as (A÷B) where A and/or B contain more than 32768 elements, Dyalog will start 4 separate threads running on the 4 separate cpus each performing the division on ¼ of the elements of the array(s) and simultaneously creating the corresponding ¼ of the result array. The threads are only started once, and reused for subsequent multi-threaded operations.

The maximum number of cpus to use can be controlled using 1111⌶, and the parallel execution threshold is changed using 1112⌶. These "tuning" I-beams should be considered experimental, and may be changed or replaced by automated tuning in a future release.

Note that the functions (+ - ×) are NOT executed using multiple cpus. This is because a single cpu is able to perform these operations so fast that memory is barely able to keep up. Tests show that multi-threading on separate cpus does not increase the speed of these operations.