
#10528: compile time performance regression with OverloadedStrings and Text
-------------------------------------+-------------------------------------
Reporter: jakewheat | Owner: bgamari
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 bgamari):
It appears that inlining is occurring where there previously was none. For
instance, each top-level bindings under 7.10.1 produces (in `-ddump-
simpl`),
{{{#!hs
T10528.strings181 :: Text
[GblId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 50 0}]
T10528.strings181 =
text-1.2.1.1:Data.Text.Show.unpackCString# "abstime"#
}}}
Whereas in 7.10.2 we get this,
{{{#!hs
T10528.strings_dt62 :: [Char]
[GblId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 50 0}]
T10528.strings_dt62 = unpackCString# "abstime"#
Rec {
-- RHS size: {terms: 220, types: 125, coercions: 9}
T10528.strings476 [InlPrag=[0], Occ=LoopBreaker]
:: forall s1_a3V7.
Data.Text.Array.MArray s1_a3V7
-> Int
-> [Char]
-> Int#
-> State# s1_a3V7
-> (# State# s1_a3V7, Text #)
[GblId, Arity=5, Str=DmdType