foreach (i; taskPool.parallel(0..2_000_000)

Steven Schveighoffer schveiguy at gmail.com
Mon Apr 3 23:13:58 UTC 2023


On 4/3/23 6:56 PM, Paul wrote:
> On Monday, 3 April 2023 at 22:24:18 UTC, Steven Schveighoffer wrote:
> 
>>>
>>>> If your `foreach` body takes a global lock (like `writeln(i);`), 
>>>> then it's not going to run any faster (probably slower actually).
>>> **Ok I did have some debug writelns I commented out.**
>>
>> And did it help?
> **No**
> 
> My program is about 140 lines Steven.  Its just one of the Advent of 
> Code challenges.  Could I past the whole program here and see what you 
> think?

Yeah, please post.

-Steve


More information about the Digitalmars-d-learn mailing list