[Haskell-cafe] Optimization again.

szefirov at ot.ru szefirov at ot.ru
Thu Dec 14 09:24:11 EST 2006


Donald Bruce Stewart wrote:

>szefirov:
>  
>
>>From GHC documentation: "Once profiling has thrown the spotlight on the 
>>guilty time-consumer(s), it may be better to re-think your program than 
>>to try all the tweaks listed below."
>>
>>So, how should I rethink my program? Which way to take?
>>    
>>
>
>Do you have some particular code that is underperforming?
>  
>
I have a plenty of it. ;)

I'm yet to decide what to blame.

>Performance tips are documented here:
>
>    http://haskell.org/haskellwiki/Performance
>  
>
Thank you. I loaded it the next second I received your answer. ;)

I profiled my program and found that residency looks pretty fixed but 
program memory usage grows and eventually I get heap overflow (on 
Windows) or heavy pagefile trashing (on Linux).

When I turn on +RTS -c to use heap compaction I immediately get the 
following:
-----------------------------
xxxx.exe: internal error: scavenge_mark_stack: unimplemented/strange 
closure type 30 @ 03678268
    Please report this as a bug to glasgow-haskell-bugs at haskell.org,
    or http://www.sourceforge.net/projects/ghc/
-----------------------------

This already reported as a bug, but isn't fixed yet. The bug is right 
here: http://cvs.haskell.org/trac/ghc/ticket/954

It does appear with 6.4.1 too.

So I try as hard as I can to reduce the size of garbage produced. No 
much luck so far.




More information about the Haskell-Cafe mailing list