[GHC] #15519: Minor code refactoring leads to drastic performance degradation
GHC
ghc-devs at haskell.org
Wed Sep 5 08:44:31 UTC 2018
#15519: Minor code refactoring leads to drastic performance degradation
-------------------------------------+-------------------------------------
Reporter: danilo2 | Owner: (none)
Type: bug | Status: new
Priority: highest | Milestone: 8.8.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords: SpecConstr
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 simonpj):
To summarise: once we have done #15578, we'll get good perf for
{{{
testGrammar1 = <blah>
{-# INLINE testGrammar1 #-}
test3 = oneShot (runTokenParser testGrammar1)
}}}
* The `INLINE` ensures that `testGrammar1` is inlined even if it is used
in many places.
* The `oneShot` is, I'm afraid, still necessary. (You can import it from
`GHC.Exts`.) It says that GHC doesn't need to worry about sharing the
work of `testGrammar1` between, say, two calls `(test3 src1)` and `(test3
src2)`.
You should get reliably good perf with these changes. OK?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15519#comment:24>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list