
#10528: compile time performance regression with OverloadedStrings and Text -------------------------------------+------------------------------------- Reporter: jakewheat | Owner: Type: bug | Status: new Priority: high | Milestone: 7.10.3 Component: Compiler | Version: 7.10.2-rc2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): When rewriting in a rule (or unfolding), GHC sets the phase to the activation phase of the rule (or unfolding); in this case [2]. Now, from comment:13, it was clear that I believed that rule `unpack` was switched off before (the new) `TEXT literal` was switched on. But I was wrong: `unpack` is active anytime before phase 1, and hence is active in phase 2; so the two still compete. I should have said {{{ {-# RULES [1] "TEXT literal" forall a. unstream (S.map safe (S.streamList (GHC.unpackCString# a))) = unpackCString# a #-} }}} Now `TEXT literal` won't be active until phase 1, by which time `unpack` is switched off. Try that. How annoying. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10528#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler