[GHC] #7307: Share top-level code for strings
GHC
ghc-devs at haskell.org
Wed Dec 4 23:43:13 UTC 2013
#7307: Share top-level code for strings
-------------------------------------+------------------------------------
Reporter: simonpj | Owner: parcs
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler | Version: 7.6.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Comment (by parcs):
Replying to [comment:4 carter]:
> Very cool! So this would also be possibly part of a first step towards
generally "statically constructing/evaluating" small constant data
structures at compile time rather than computing them? I'm not familiar
with that piece of GHC as yet, but i'll take a wee look at the patch.
The `String` is still created at runtime. But the code that creates a heap
object from the static object is no longer duplicated for each string
literal in the module.
(Hmm, I wonder whether this technique could be generalized for all CAFs,
not just top-level strings...)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7307#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list