
#14790: eqTypeRep does not inline -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.1-alpha2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by dfeuer): No, not yet. I'll do that later today if you like. But I also don't really understand what that will accomplish. `INLINABLE` tells GHC to make an unfolding. But GHC already makes an unfolding; it just doesn't use it. Does `INLINABLE` change what unfolding it makes? The purpose of the wrapper is to use the fact that we know more about what information will be available/useful at typical `eqTypeRep` call sites than the compiler does; we therefore have a better sense of which part will actually be useful to inline. If we inline the whole thing as it stands, then the call site will get two calls to `typeRepFingerprint` and a call to `==`. That's certainly larger than a call to `sameTypeRep`; is it also better in enough cases to matter? I don't know. On the other hand, I know that in virtually all realistic cases we want to use inlining to eliminate the `Maybe` business. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14790#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler