[Yhc] Lack of monomorphism harms Bernouilli nofib benchmark

Neil Mitchell ndmitchell at gmail.com
Fri Nov 30 02:08:16 EST 2007


Hi,

I was benchmarking, and Bernouilli has a bit:

powers = [2..] : map (zipWith (*) (head powers)) powers

Hugs and GHC both see powers :: [[Integer]] and a beautiful CAF.

Yhc (and nhc) both see powers :: (Enum a, Num a) => [[a]] and no CAF.

This is going to be a severe performance bottleneck!

First, can someone with slightly more knowledge check I've got this
right. Second, do we "fix" the nofib suite, since the monomorphism
restriction is a bit evil and generally to be avoided. Third, do we
"fix" nyhc. Fourth, should we care about silly benchmarks.

Thanks

Neil


More information about the Yhc mailing list