reddit discussion about Go turns to D again

dsimcha dsimcha at yahoo.com
Sun May 15 09:04:05 PDT 2011


On 5/15/2011 11:41 AM, Robert Clipsham wrote:
> Automatically using a parallel algorithm if it's likely to improve
> speed? Awesome. I assume that std.parallelism sets up a thread pool upon
> program start so that you don't have the overhead of spawning threads
> when you use a parallel algorithm for the first time?
>

No, it does so lazily.  It seemed silly to me to do this eagerly when it 
might never be used.  If you want to make it eager all you have to do is 
reference the taskPool property in the first line of main().

>> A user-level program could import std.parallel_algorithm and
>> std.algorithm, and choose which version to use by simply qualifying
>> function calls with the same signature. (That's also why we should think
>> of a shorter name instead of parallel_algorithm... and with this
>> parenthesis I instantly commanded the attention of the entire community.)
>
> I'll give my +1 to bearophile's palgorithm unless something better appears.
>
>> Andrei
>



More information about the Digitalmars-d mailing list