Requesting Help with Optimizing Code

tsbockman thomas.bockman at gmail.com
Thu Apr 8 18:25:59 UTC 2021


On Thursday, 8 April 2021 at 16:59:07 UTC, Bastiaan Veelo wrote:
> On Thursday, 8 April 2021 at 16:37:57 UTC, Kyle Ingraham wrote:
>> Are compilers able to take loops and parallelize them?
>
> No, but you can quite easily:
> ...
> https://dlang.org/phobos/std_parallelism.html#.parallel

In keeping with my earlier comment about structuring nested loops 
optimally, the parallelism should be applied at the level of the 
"for each pixel" loop, so that each pixel's memory only needs to 
be touched by one CPU core.


More information about the Digitalmars-d mailing list