[Haskell-cafe] Haskell Speed Myth

Krzysztof Skrzętnicki gtener at gmail.com
Sat Aug 23 18:34:55 EDT 2008

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.

On Sat, Aug 23, 2008 at 21:19, Thomas Davie <tom.davie at gmail.com> wrote:
> On 23 Aug 2008, at 20:01, Luke Palmer wrote:
>> 2008/8/23 Thomas Davie <tom.davie at gmail.com>:
>>> Finally, that threading example... WOW! 65 times faster, and the code is
>>> *really* simple.  The C on the other hand is a massive mess.
>> I've been wondering about this, but I can't check because I don't have
>> a multi core cpu.  I've heard GHC's single threaded runtime is very
>> very good.  What are the results for the threading example when
>> compiled with -threaded and run with at least +RTS -N2?
> That's really interesting -- I just tried this.
> Compiling not using -threaded: 1.289 seconds
> Compiling using -threaded, but not running with -N2: 3.403 seconds
> Compiling using -threaded, and using -N2: 55.072 seconds
> Wow!  Haskell's runtime really is a *lot* better than trying to use
> operating system threads.  I wonder if there's a point at which it becomes
> better to use both CPUs, or if the overhead of using OS threads for that
> problem is just too high.
> Bob
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list