On Saturday, 3 May 2014 at 18:26:37 UTC, Walter Bright wrote:
On 5/3/2014 10:22 AM, Atila Neves wrote:
I can reproduce the slower-with-threads issue without using my
library. I've
included the source file below and would like to know if other
people see the
same thing.
I haven't investigated this, but my suspicions are:
1. thread creation/destruction is dominating the times.
In the current measurements probably since the whole run takes
less than a second. But the first ones I did were dozens of
seconds long, so I don't think so.
2. since very few of the unittests block, there is no speed
advantage from having more threads than cores. If you limit the
number of threads to the number of cores on your machine, you
might see a speedup.
Like I mentioned above, unless I'm mistaken taskPool should be
using a correct number of threads for my machine already.