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

Paul phshaffer at gmail.com
Mon Apr 3 22:56:08 UTC 2023


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?

Thanks for your assistance...much appreciated.





More information about the Digitalmars-d-learn mailing list