
#13395: 3x slowdown on GHC HEAD with file containing lots of overloaded string literals -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | performance bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I just noticed that compiling `xmlhtml-0.2.3.5` from Hackage takes an extraordinarily long time on GHC HEAD. The slowdown can be attributed to the `Text.XmlHtml.HTML.Meta` module. I've extracted it and tweaked it so that it requires no dependencies to build (I now use `ByteString` instead of `Text`, but the slowdowns for both types were about the same.) On GHC 8.0.2, it takes about 3 seconds to compile the attached module: {{{ $ /usr/bin/time /opt/ghc/8.0.2/bin/ghc -fforce-recomp TextXmlHtmlHTMLMeta.hs [1 of 1] Compiling Text.XmlHtml.HTML.Meta ( TextXmlHtmlHTMLMeta.hs, TextXmlHtmlHTMLMeta.o ) 3.44user 0.07system 0:03.51elapsed 99%CPU (0avgtext+0avgdata 208480maxresident)k 0inputs+21688outputs (0major+43934minor)pagefaults 0swaps }}} But on GHC HEAD, it takes about 10 seconds: {{{ $ /usr/bin/time ~/Software/ghc2/inplace/bin/ghc-stage2 -fforce-recomp TextXmlHtmlHTMLMeta.hs [1 of 1] Compiling Text.XmlHtml.HTML.Meta ( TextXmlHtmlHTMLMeta.hs, TextXmlHtmlHTMLMeta.o ) 9.93user 0.11system 0:10.03elapsed 100%CPU (0avgtext+0avgdata 233656maxresident)k 0inputs+21464outputs (0major+54853minor)pagefaults 0swaps }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13395 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler