#15304: Huge increase of compile time and memory use from 8.0.2 to 8.2.2 or 8.4.2
-------------------------------------+------------------------------------- Reporter: NathanWaivio | Owner: tdammers Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by NathanWaivio): I have found an undocumented flag: "-fno-worker-wrapper". When enabled the original code compiles in 43.20 seconds (37x improvement in time), and uses 660MB max (48x improvement in space) with GHC 8.4.2. All of the tests pass for the library and the benchmark still performs at the improved speed. It seems like the Worker/Wrapper Transformation is causing issues with this code. Why is that? Perhaps Worker/Wrapper shouldn't be run in certain circumstances. What do you think? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15304#comment:16> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ ghc-tickets mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets |
In reply to this post by GHC - devs mailing list
#15304: Huge increase of compile time and memory use from 8.0.2 to 8.2.2 or 8.4.2
-------------------------------------+------------------------------------- Reporter: NathanWaivio | Owner: tdammers Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by tdammers): Sounds like a promising lead, if not the key to figuring this out. Worker/wrapper is generally a good thing to do; in theory, all it should do is turn arguments to recursive function calls closures, thus reducing the argument-passing overhead. But I can imagine that this would also get in the way of inlinings and `RULES`. So what we're looking for is code that follows the pattern that makes it a candidate for worker/wrapper optimization (parameters passed through recursive calls unchanged), such that the worker/wrapper optimization breaks up expressions that might otherwise trigger useful inlinings or rewrites. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15304#comment:17> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ ghc-tickets mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets |
In reply to this post by GHC - devs mailing list
#15304: Huge increase of compile time and memory use from 8.0.2 to 8.2.2 or 8.4.2
-------------------------------------+------------------------------------- Reporter: NathanWaivio | Owner: tdammers Type: bug | Status: new Priority: high | Milestone: 8.6.1 Component: Compiler | Version: 8.4.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 Type of failure: Compile-time | (amd64) performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by NathanWaivio): I've continued to investigate and found an alternate work around. I changed every $! in the code to a $ I would get the improved compile performance even with worker-wrapper active. I'm not sure what that means. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15304#comment:18> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ ghc-tickets mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets |
Free forum by Nabble | Edit this page |