[GHC] #16198: Cmm string literals shouldn't be represented as [Word8]

#16198: Cmm string literals shouldn't be represented as [Word8] -------------------------------------+------------------------------------- Reporter: hsyl20 | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- While we use ByteString to represent string literals in Core/STG, they are unpacked into [Word8] when compiled into Cmm. This is bad for performance, especially with large strings and there is no reason to do it. Patch coming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16198 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16198: Cmm string literals shouldn't be represented as [Word8] -------------------------------------+------------------------------------- Reporter: hsyl20 | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hsyl20): * status: new => patch Comment: Merge request: https://gitlab.haskell.org/ghc/ghc/merge_requests/135 Reusing the benchmark in #16190 (time to compile a file printing a string literal of the given size), I obtain the following results before and after the patch: || Size || Before patch || After patch || Gain || || 128 || 0.730 || 0.732 || 0% || || 3K || 0.731 || 0.727 || 0% || || 30K || 0.736 || 0.714 || +3% || || 100K || 0.804 || 0.748 || +7% || || 500K || 1.038 || 0.974 || +6% || || 1M || 1.342 || 1.157 || +14% || || 2M || 1.926 || 1.689 || +12% || || 3M || 2.539 || 2.088 || +18% || || 30M || 20.182 || 14.729 || +27% || -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16198#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16198: Cmm string literals shouldn't be represented as [Word8] -------------------------------------+------------------------------------- Reporter: hsyl20 | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hsyl20): * status: patch => closed * resolution: => fixed Comment: Merged with 4fa32293c9d2658ce504b8fe6d909db2acf59983 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16198#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16198: Cmm string literals shouldn't be represented as [Word8]
-------------------------------------+-------------------------------------
Reporter: hsyl20 | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Resolution: fixed | Keywords:
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 Ben Gamari
participants (1)
-
GHC