[GHC] #9577: String literals are wasting space
GHC
ghc-devs at haskell.org
Wed Sep 24 12:30:58 UTC 2014
#9577: String literals are wasting space
-------------------------------------+-------------------------------------
Reporter: xnyhps | Owner: xnyhps
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 7.8.2
(NCG) | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: Runtime | Related Tickets:
performance bug |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by tibbe):
Replying to [comment:8 simonmar]:
> Any `memcpy` of a string will not be a statically known size.
Furthermore, for small strings I think the space we save by not aligning
them outweighs any benefit from aligned memcpy.
Why not? With OverloadedLists we now desugar list literals (which are
really no different than string literals, conceptually) to `fromListN`, so
code that creates e.g. a `ByteString` from a list literal can be
implemented with a memcpy that has its argument statically known.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9577#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list