Re: [GHC] #7450: Regression in optimisation time of functions with many patterns (6.12 to 7.4)?

#7450: Regression in optimisation time of functions with many patterns (6.12 to 7.4)? -------------------------------------+------------------------------------- Reporter: iustin | Owner: bgamari Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab:D1012 -------------------------------------+------------------------------------- Comment (by bgamari): Phab:D1012 appears to give a moderate improvement in compile time in this case. Take, for instance, a 1000-constructor testcase, {{{#!hs module Mod(F(..)) where data F = F0 { fldF0 :: ()} | F1 { fldF1 :: ()} ... | F1023 {fldF1023 :: ()} deriving (Read) }}} With 7.11 prior to the change `ghc -O` runs for about 140 seconds. After the change it runs for about 100 seconds. Moreover, one sees a substantial reduction in heap allocations. The previously non-linear performance degradation can be seen in the table below. ||= Number of constructors =||||||= allocated (MBytes) =||||||= time (seconds) =|| ||= n =||= Pre-D1012 =||= Post-D1012 =||= Delta (%) =||= Post-D1012 =||= Post-D1012 =||= Delta (%) =|| || 16|| 1.75 ± 0.03 || 1.69 ± 0.02 || -3%|| 1484.58 ± 0.75 || 1470.53 ± 0.77 || -1%|| || 64|| 6.62 ± 0.25 || 5.96 ± 0.06 || -10%|| 5466.96 ± 1.53 || 5248.22 ± 1.64 || -4%|| || 128|| 13.33 ± 0.82 || 12.00 ± 0.63 || -10%|| 11282.75 ± 1.55 || 10406.51 ± 1.99 || -8%|| || 256|| 26.68 ± 0.53 || 23.69 ± 0.81 || -11%|| 24680.84 ± 2.32 || 21137.36 ± 2.36 || -14%|| || 512|| 67.61 ± 2.69 || 47.99 ± 0.67 || -29%|| 58628.48 ± 30.32 || 44412.63 ± 0.36 || -24%|| || 1024|| 144.91 ± 4.07 || 102.19 ± 0.60 || -29%|| 156753.21 ± 374.40 || 99523.84 ± 121.99 || -37%|| || 2048|| 379.93 ± 6.77 || 236.63 ± 3.51 || -38%|| 478481.02 ± 287.23 || 248791.64 ± 233.84 || -48%|| || 4096|| 1379.47 ± 0.00 || 650.83 ± 5.65 || -53%|| 1690084.72 ± 0.00 || 759242.66 ± 42.84 || -55%|| -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7450#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC