[Haskell-cafe] Re: MD5 performance optimizations
Andrew Coppin
andrewcoppin at btinternet.com
Tue May 20 16:09:39 EDT 2008
Bulat Ziganshin wrote:
> Hello Andrew,
>
> Tuesday, May 20, 2008, 11:05:52 PM, you wrote:
>
>
>>> -funbox-strict-fields.
>>>
>>>
>
>
>> I did try that, but it didn't seem to make any difference for me. [Maybe
>>
>
> it may be that ghc just not recompiled program when you supplied this
> switch.
>
Possibly. I notice that adding *some* switches makes GHC recompile
everything, while others don't. [It's probably documented in the manual
somewhere...]
> and, without this switch representation for !Int32 is the same as for
> Int32 - only difference is that when data is assigned to such field
> they are evaluated first (and then boxed)
>
Right, OK - so strict evaluation, but some bitpattern in RAM.
> 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...
More information about the Haskell-Cafe
mailing list