[commit: ghc] master: Minor performance note about IdInfo. (acb9e85)

git at git.haskell.org git at git.haskell.org
Thu Jun 9 04:24:03 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/acb9e85cad6b26a7f69276bac709b6406ff7ab6e/ghc

>---------------------------------------------------------------

commit acb9e85cad6b26a7f69276bac709b6406ff7ab6e
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date:   Mon Jun 6 10:18:57 2016 -0700

    Minor performance note about IdInfo.
    
    Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>


>---------------------------------------------------------------

acb9e85cad6b26a7f69276bac709b6406ff7ab6e
 compiler/basicTypes/IdInfo.hs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/compiler/basicTypes/IdInfo.hs b/compiler/basicTypes/IdInfo.hs
index 2113cd4..97d4186 100644
--- a/compiler/basicTypes/IdInfo.hs
+++ b/compiler/basicTypes/IdInfo.hs
@@ -198,6 +198,10 @@ pprIdDetails other     = brackets (pp other)
 -- Most of the 'IdInfo' gives information about the value, or definition, of
 -- the 'Id', independent of its usage. Exceptions to this
 -- are 'demandInfo', 'occInfo', 'oneShotInfo' and 'callArityInfo'.
+--
+-- Performance note: when we update 'IdInfo', we have to reallocate this
+-- entire record, so it is a good idea not to let this data structure get
+-- too big.
 data IdInfo
   = IdInfo {
         arityInfo       :: !ArityInfo,          -- ^ 'Id' arity



More information about the ghc-commits mailing list