[Haskell-cafe] Re: MD5 performance optimizations

Bulat Ziganshin bulat.ziganshin at gmail.com
Tue May 20 16:50:04 EDT 2008


Hello Andrew,

Wednesday, May 21, 2008, 12:09:39 AM, you wrote:

> Right, OK - so strict evaluation, but some bitpattern in RAM.

yes. in particular this allows to designate fields that should de
initialized:

data A = A {a :: Int, b :: !Int}
main = print A{}

>> it is not enabled by default, because for *non-primitive* datatypes
>> such as B below automatic unboxing of strict fields of this type may
>> decrease sharing and thus memory/performance.

> Yeah, I can imagine...

sometime i've seriously optimized my program by removing this switch
and adding manual unboxing directives to the sources. it will be great
if ghc will catch jhc here


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list