
#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:3 xnyhps]:
The main argument in favor of alignment seems to be: code often `memcpy`s string literals into buffers. By doing that with aligned addresses (apparently) SSE instructions can be used. This is irrelevant for GHC, because the strings are only parsed into `[Char]`s, never copied.
We avoid going via `[Char]` when creating `ByteString` literals already today (using RULES). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9577#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler