[Haskell-cafe] Haskell Speed Myth

Thomas Davie tom.davie at gmail.com
Sun Aug 24 04:31:52 EDT 2008


On 24 Aug 2008, at 06:31, Thomas M. DuBuisson wrote:

>
>> 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
>>
>
> I was hoping to see a relative improvement when introducting an
> opportunity parallelism in the program, so I made a version with two
> MVars filled at the start.  This didn't work out though - perhaps some
> performance stands to be gained by improving the GHC scheduler wrt  
> cpu /
> OS thread affinity for the Haskell threads?
>
> For the curious:
>
> -O2: 7.3 seconds (CPU: 99.7% user)
> -O2 -threaded: 11.5 seconds (CPU: 95% user, 5% system)
> -O2 -threaded ... +RTS -N2: killed after 3 minutes (CPUs: 15% user,  
> 20%
> system)
>
> Thats quite a lot of CPU time going to the system.
>
> Specs:
> Linux 2.6.26 (Arch) x86_64
> Intel Core 2 Duo 2.5GHz

Hmm thanks, that's interesting -- I was think it was probably caused  
by OS X, but it appears to happen on Linux too.  Could you try running  
the old code too, and see if you experience the order of magnitude  
slowdown too?

Bob


More information about the Haskell-Cafe mailing list