-
Simon Peyton Jones authored
------------------------- Performance tuning things ------------------------- I did some nofib tests, and fixed a number of performance problems. 1. Things were getting floated to top level, and that prevented some useful fusion happening. y = build g x = foldr k z y Fixed by arranging that we only get really keen on floating to top level in the second run of the let-float-out pass. 2. Some fettling up on the let-floater itself. It had some parameters that weren't even being used! And it was stupidly floating things out of a one-shot lambda, and the float-in pass didn't float them back in. I think I fixed both of these problems. 3. The eta-reducer was not eta-reducing (/\a -> g a) to g. In general it has to be a bit careful because "seq" means that (\x -> g x) is not in general the same as g ---- but it *is* the same for a type lambda. This turned out to be important in rule matching, where the foldr/build rule was not firing because the LHS of the rule looked like foldr k z (/\ a -> g a) = ... which never matched! Result, no fusion to speak of! 4. The simplifier was a bit too gung ho about inlining used-once things bound to constructor args. The comment is with Simplify.simplNonRecX.
5f087cf4