Performance regression on typechecking type families?

Hi, Prompted by this question: http://stackoverflow.com/questions/26538595/more-efficient-type-level-comput... I wrote some code today using closed type families and datakinds. Also, as a baseline, I typechecked the code using open type families from the original question. The two files are here: https://gist.github.com/gergoerdi/727f028e4c1ed158ac9a https://gist.github.com/gergoerdi/f96d1a9a58f5e3dccc18 On GHC 7.8.3, typechecking took about 45 seconds for each. However, on a 'perf' build of GHC 7.9 d8c437b3, with ghc-stage2, the first one took 1m3s and the second one 1m12s. A 40% and 60% increase in typechecking time, respectively! Is this some known regression, something surprising, or is 'perf' simply not the right build flavour for this kind of comparison? Bye, Gergo

I personally have run into exponential compile times with type families. Unfortunately I have not had the time yet to reduce my test case to something tractable. Janek Dnia sobota, 29 listopada 2014, Dr. ERDI Gergo napisaĆ:
Hi,
Prompted by this question: http://stackoverflow.com/questions/26538595/more-efficient-type-level-compu tations-using-type-families I wrote some code today using closed type families and datakinds. Also, as a baseline, I typechecked the code using open type families from the original question.
The two files are here:
https://gist.github.com/gergoerdi/727f028e4c1ed158ac9a https://gist.github.com/gergoerdi/f96d1a9a58f5e3dccc18
On GHC 7.8.3, typechecking took about 45 seconds for each. However, on a 'perf' build of GHC 7.9 d8c437b3, with ghc-stage2, the first one took 1m3s and the second one 1m12s. A 40% and 60% increase in typechecking time, respectively!
Is this some known regression, something surprising, or is 'perf' simply not the right build flavour for this kind of comparison?
Bye, Gergo _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

| I personally have run into exponential compile times with type families. | Unfortunately I have not | had the time yet to reduce my test case to something tractable. Ha! If you do find the time, I'm sure everyone would be grateful. Just use the time while waiting for the type checker. If it is truly exponential, you will easily have enough waiting time :-) Simon

I'm certainly unaware of any reason this should be expected. I would report as a bug, and, personally, would label it "High" priority. I think there is plenty of room for GHC to be more efficient around type families.
Thanks for putting together a test!
Richard
On Nov 29, 2014, at 5:17 AM, "Dr. ERDI Gergo"
Hi,
Prompted by this question: http://stackoverflow.com/questions/26538595/more-efficient-type-level-comput... I wrote some code today using closed type families and datakinds. Also, as a baseline, I typechecked the code using open type families from the original question.
The two files are here:
https://gist.github.com/gergoerdi/727f028e4c1ed158ac9a https://gist.github.com/gergoerdi/f96d1a9a58f5e3dccc18
On GHC 7.8.3, typechecking took about 45 seconds for each. However, on a 'perf' build of GHC 7.9 d8c437b3, with ghc-stage2, the first one took 1m3s and the second one 1m12s. A 40% and 60% increase in typechecking time, respectively!
Is this some known regression, something surprising, or is 'perf' simply not the right build flavour for this kind of comparison?
Bye, Gergo _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (4)
-
Dr. ERDI Gergo
-
Jan Stolarek
-
Richard Eisenberg
-
Simon Peyton Jones