
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
#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]: 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