Running Phobos unit tests in threads: I have data
Atila Neves via Digitalmars-d
digitalmars-d at puremagic.com
Sun May 4 01:47:15 PDT 2014
Like I mentioned afterwards, I tried a different number of
threads. On my machine, at least, std.parallelism.totalCPUs
returns 8, the number of virtual cores. As it should.
Atila
On Sunday, 4 May 2014 at 07:49:51 UTC, Russel Winder via
Digitalmars-d wrote:
> On Sat, 2014-05-03 at 19:37 +0000, Atila Neves via
> Digitalmars-d wrote:
> […]
>> I'm using parallel and taskPool from std.parallelism. I was
>> under the impression it gave me a ready-to-use pool with as
>> many threads as I have cores.
>
> There is a default, related to the number of cores the OS
> thinks there
> is (*), but you can also set the number manually.
> std.parallelism could
> do with some work to make it better than it already is.
>
>
> (*) Physical cores are not necessarily the number reported by
> the OS due
> to core hyperthreads. Quad core no hyperthreads, and dual core,
> two
> hyperthreads per core, both get reported as four processor
> systems.
> However if you benchmark them you get very, very different
> performance
> characteristics.
More information about the Digitalmars-d
mailing list