[GHC] #10528: compile time performance regression with OverloadedStrings and Text (was: compile time performance regression on big literal)
GHC
ghc-devs at haskell.org
Fri Jul 24 13:30:56 UTC 2015
#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:
-------------------------------------+-------------------------------------
Changes (by thomie):
* priority: normal => high
* version: => 7.10.2-rc2
* milestone: => 7.10.3
Comment:
I can reproduce this with the test below. Compiling with `7.10.2` takes
more than 10x longer than with `7.10.1`.
{{{
{-# LANGUAGE OverloadedStrings #-}
module T10528 where
import Data.Text (Text)
strings :: [Text]
strings = [
"abstime", "aclitem", "bit", "bool", "box", "bpchar", "bytea", "char",
"cid", "cidr", "circle", "date", "float4", "float8", "gtsvector",
"inet",
"interval", "json", "jsonb", "line", "lseg", "macaddr", "money", "name",
"numeric", "oid", "oidvector", "path", "pg_lsn", "pg_node_tree",
"point",
"polygon", "refcursor", "regclass", "regconfig", "regdictionary",
"regoper",
"regoperator", "regproc", "regprocedure", "regtype", "reltime", "smgr",
"text", "tid", "time", "timestamp", "timestamptz", "timetz",
"tinterval",
"tsquery", "tsvector", "txid_snapshot", "unknown", "uuid", "varbit",
"varchar", "xid", "bit", "bool", "box", "bpchar", "bytea", "char",
"cid",
"cidr", "circle", "date", "float4", "float8", "gtsvector", "inet",
"int2",
"int2vector", "int4", "int8", "interval", "json", "jsonb", "line",
"lseg",
"macaddr", "money", "name", "numeric", "oid", "oidvector", "path",
"pg_lsn",
"pg_node_tree", "point", "polygon", "refcursor", "regclass",
"regconfig",
"regdictionary", "regoper", "regoperator", "regproc", "regprocedure",
"regtype", "reltime", "smgr", "text", "tid", "time", "timestamp",
"timestamptz", "timetz", "tinterval", "tsquery", "tsvector",
"txid_snapshot", "unknown", "uuid", "varbit", "varchar", "xid", "xml"
]
}}}
{{{
$ cabal install text
$ ghc-7.10.1 T10528.hs -c -fforce-recomp -Rghc-timing -O
<<ghc: 186739648 bytes, 94 GCs, 4318989/12392440 avg/max bytes residency
(7 samples), 28M in use, 0.001 INIT (0.004 elapsed), 0.332 MUT (0.387
elapsed), 0.328 GC (0.395 elapsed) :ghc>
$ ghc-7.10.2 T10528.hs -c -fforce-recomp -Rghc-timing -O
<<ghc: 2719125976 bytes, 440 GCs, 16808138/34792080 avg/max bytes
residency (13 samples), 97M in use, 0.001 INIT (0.001 elapsed), 6.439 MUT
(10.141 elapsed), 2.795 GC (4.449 elapsed) :ghc>>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10528#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list