[GHC] #14254: The Binary instance for TypeRep smells a bit expensive
GHC
ghc-devs at haskell.org
Fri Dec 1 23:37:41 UTC 2017
#14254: The Binary instance for TypeRep smells a bit expensive
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: Typeable
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #14337 | Differential Rev(s): Phab:D3998,
Wiki Page: | Phab:D4082, Phab:D4085
-------------------------------------+-------------------------------------
Comment (by David Feuer <David.Feuer@…>):
In [changeset:"bc761ad9c65c7aa62d38db39c59a6c0ae59c8ab8/ghc" bc761ad/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="bc761ad9c65c7aa62d38db39c59a6c0ae59c8ab8"
Cache TypeRep kinds aggressively
Cache `TypeRep k` in each `TrApp` or `TrTyCon` constructor of
`TypeRep (a :: k)`. This makes `typeRepKind` cheap.
With this change, we won't need any special effort to deserialize
typereps efficiently. The downside, of course, is that we make
`TypeRep`s slightly larger.
Reviewers: austin, hvr, bgamari, simonpj
Reviewed By: bgamari, simonpj
Subscribers: carter, simonpj, rwbarton, thomie
GHC Trac Issues: #14254
Differential Revision: https://phabricator.haskell.org/D4085
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14254#comment:17>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list