[Haskell-cafe] Haskell Speed Myth
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Sat Aug 23 19:26:44 EDT 2008
On 2008 Aug 23, at 18:34, Krzysztof Skrzętnicki wrote:
> Recently I wrote computation intensive program that could easily
> utilize both cores. However, there was overhead just from compiling
> with -threaded and making some forkIO's. Still, the overhead was not
> larger than 50% and with 4 cores I would probably still get the
> results faster - I didn't experience an order of magnitude slowdown.
> Perhaps it's the issue with OS X.
All that's needed for multicore to be a *lot* slower is doing it
wrong. Make sure you're forcing the right things in the right places,
or you could quietly be building up thunks on both cores that will
cause lots of cross-core signaling or locking. And, well, make sure
the generated code isn't stupid. Quite possibly the PPC code is an
order of magnitude worse than the better-tested Intel code.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list