#5034: Performance of Data.Graph.{preorderF, postorderF}
----------------------------------+-----------------------------------------
    Reporter:  michalt            |        Owner:                         
        Type:  bug                |       Status:  patch                  
    Priority:  normal             |    Milestone:                         
   Component:  libraries (other)  |      Version:  7.0.2                  
    Keywords:                     |     Testcase:                         
   Blockedby:                     |   Difficulty:                         
          Os:  Unknown/Multiple   |     Blocking:                         
Architecture:  Unknown/Multiple   |      Failure:  Runtime performance bug
----------------------------------+-----------------------------------------

Comment(by simonmar):

 In GHC's version of this code we have

 {{{
 postorder :: Tree a -> [a] -> [a]
 postorder (Node a ts) = postorderF ts . (a :)

 postorderF   :: Forest a -> [a] -> [a]
 postorderF ts = foldr (.) id $ map postorder ts
 }}}

 which I presume fixes the problem modulo a constant factor.  Care to test
 with this version to see what the constant factor is?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5034#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to