patch applied (ghc): Desugar multiple polymorphic bindings more
intelligently
Simon Peyton Jones
simonpj at microsoft.com
Thu Jun 5 08:50:35 EDT 2008
Thu Jun 5 05:44:23 PDT 2008 simonpj at microsoft.com
* Desugar multiple polymorphic bindings more intelligently
Occasionally people write very large recursive groups of definitions.
In general we desugar these to a single definition that binds tuple,
plus lots of tuple selectors. But that code has quadratic size, which
can be bad.
This patch adds a new case to the desugaring of bindings, for the
situation where there are lots of polymorphic variables, but no
dictionaries. (Dictionaries force us into the general case.)
See Note [Abstracting over tyvars only].
The extra behaviour can be disabled with the (static) flag
-fno-ds-multi-tyvar
in case we want to experiment with switching it on or off. There is
essentially-zero effect on the nofib suite though.
I was provoked into doing this by Trac #1136. In fact I'm not sure
it's the real cause of the problem there, but it's a good idea anyway.
M ./compiler/deSugar/DsBinds.lhs -33 +135
M ./compiler/main/StaticFlags.hs +7
View patch online:
http://darcs.haskell.org/ghc/_darcs/patches/20080605124423-1287e-67d2828e0ffaaeac6b8c9cffebc1288e275f7673.gz
More information about the Cvs-ghc
mailing list