[Haskell-cafe] Threading and Mullticore Computation

Svein Ove Aas svein.ove at aas.no
Tue Mar 3 12:46:20 EST 2009


On Tue, Mar 3, 2009 at 6:41 PM, Don Stewart <dons at galois.com> wrote:
> allbery:
>> On 2009 Mar 3, at 12:31, mwinter at brocku.ca wrote:
>>> In both runs the same computations are done (sequentially resp.
>>> parallel), so the gc should be the same. But still using 2 cores is
>>> much slower than using 1 core (same program - no communication).
>>
>> The same GCs are done, but GC has to be done on a single core
>> (currently; parallel GC is in development) so you will see a lot more
>> lock contention when the GC kicks in.
>>
>
> Assuming he is using GHC 6.10, the parallel GC is enabled by default
> when you use -Nn where n > 1. That's is -N4 will use -g4   (4 cores to
> collect). So GC should be the same or a little faster.
>
Further, GHC (6.10 at least) uses one allocation area per thread,
meaning there's no contention on allocation.

I'd echo the request to try it with -O2, though.


More information about the Haskell-Cafe mailing list