
14 Jun
2011
14 Jun
'11
8:35 a.m.
Dear all, I am very puzzled by a program that contains an "else" branch that is never executed, but still seems to slow down the program. (When I replace it by "undefined", the resulting program runs much faster.) http://hackage.haskell.org/trac/ghc/ticket/5256 I thought it may be a type issue (the type of the else branch forces the type of the "then" branch to be more general, thus some optimization might not fire) but the types of the branches look identical. (They are generic, but the specializer should take care of that.) I am sure GHC headquarters will look at this when they find the time but perhaps there's some additional knowledge on this mailing list that might help. J.W.