optimisations to newUnique
authorSimon Marlow <simonmar@microsoft.com>
Tue, 25 Jul 2006 14:08:16 +0000 (14:08 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 25 Jul 2006 14:08:16 +0000 (14:08 +0000)
commitbb3dcf3988d766149f7793b93210db5f64e91542
tree8ccb282539e09bccc830426024b319461c284a1c
parent6e2cffab037ee968dc49658ba75cc03beabcb769
optimisations to newUnique

It turned out that newUnique was wasting one node of the splittable
uniq supply per invocation: it took the current supply, split it, used
the unique from one half and stored the other half in the monad.  In
other words, the unique in the supply stored in the monad was never
used.

This optimisation fixes that and adds a bit of strictness, which
together lead to small reduction in allocations by the compiler, and
possibly an improvement in residency (hard to tell for sure when GCs
move around).
compiler/typecheck/TcRnMonad.lhs