[Haskell-cafe] MD5 performance optimizations
Andrew Coppin
andrewcoppin at btinternet.com
Tue May 20 14:55:48 EDT 2008
Don Stewart wrote:
> Andrew, I hope you look carefully at the suggestions here, and use them
> to improve the code you were working on.
>
Indeed, this is just the sort of stuff I was hoping to get... [Top marks
for spotting the laziness leak in "pad" BTW! I totally missed that.]
While I'm here, can I just clarify *exactly* what -funbox-strict-fields
actually does?
I was under the impression that if you have a single-constructor type
with all strict fields, GHC would automatically try to avoid boxing and
unboxing it. However, the existence of this flag seems to indicate that
it only performs this particular optimisation if you ask for it. But on
the third hand, turning this flag on or off makes no measurable
performance difference. (At least, in the tests I did. Maybe that's
because it was swamped by all the other inefficiencies mentioned?) Some
clarification?
More information about the Haskell-Cafe
mailing list