problem with parallel foreach
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 12 08:24:44 PDT 2015
On 05/12/2015 07:59 AM, Gerald Jansen wrote:
> the performance of my D version deteriorates
> rapidly beyond a handful of jobs whereas the time for the Python version
> increases linearly with the number of jobs per cpu core.
It may be related to GC collections. If it hasn't been changed recently,
every allocation from GC triggers a collection cycle. D's current GC
being a stop-the-world kind, you lose all benefit of parallel processing
when that happens.
Without seeing runJob, even arr2.dup may be having such an effect on the
performance.
Ali
More information about the Digitalmars-d-learn
mailing list