
#11146: Manual eta expansion leads to orders of magnitude less allocations -------------------------------------+------------------------------------- Reporter: niteria | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by nomeata): Let me be cheeky: Where is the bug in the report? It is not a secret that eta-expanded definitions tend to perform better, unless you make use of sharing somewhere. So maybe you did expect the compiler to make that transformation for you? But for that to happen, the compiler needs to be very sure that it is safe to do so (e.g. no loss of sharing), and in a modular compiler, that is often not possible. Do you have a (hopefully small and self-contained) bit of code where you think “duh, obviously the compiler should be a allowed to eta-expand here”, but it does not? Do things are better if all the relevant code is in one module, with an explicit export list that does not include any of the functions you’d like to see eta-expanded? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11146#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler