Parallelizing factorial computation

Uknown sireeshkodali1 at gmail.com
Sat Aug 25 04:22:11 UTC 2018


On Friday, 24 August 2018 at 20:43:46 UTC, Peter Alexander wrote:
> On Friday, 24 August 2018 at 13:04:47 UTC, Uknown wrote:
>> I was quite surprised by the fact that parallel ran so much 
>> slower than recursive and loop implementations. Does anyone 
>> know why?
>
> n = 100 is too small to see parallelism gains.
>
> Try n = 10000
>
> https://run.dlang.io/is/XDZTSd

I was using n = 10000 originally, I reduced it because that 
wasn't running on run.dlang. Tried this again on my machine and 
you were right.


More information about the Digitalmars-d-learn mailing list