[Haskell-cafe] Haskell Speed Myth
Jed Brown
jed at 59A2.org
Mon Aug 25 04:12:41 EDT 2008
On Sun 2008-08-24 11:03, Thomas M. DuBuisson wrote:
> Yay, the multicore version pays off when the workload is non-trivial.
> CPU utilization is still rather low for the -N2 case (70%). I think the
> Haskell threads have an affinity for certain OS threads (and thus a
> CPU). Perhaps it results in a CPU having both tokens of work and the
> other having none?
This must be obvious to everyone but the original thread-ring cannot
possibly be faster with multiple OS thread since a thread can only be
running if it has the token, otherwise it is just blocked on the token.
If there are threads executing simultaneously, the token must at least
be written to the shared cache if not to main memory. With the single
threaded runtime, the token may never leave L1. The difference between
-threaded -N1 and -nothreaded may be influenced by the effectiveness of
prefetching the next thread (since presumably not all 503 threads can
reside in L1).
Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080825/11917dd7/attachment.bin
More information about the Haskell-Cafe
mailing list