#6082: Program compiled with 7.4.1 runs many times slower than compiled with 
7.2.2
----------------------------------+-----------------------------------------
    Reporter:  gchrupala          |       Owner:  pcapriotti             
        Type:  bug                |      Status:  new                    
    Priority:  high               |   Milestone:  7.4.3                  
   Component:  libraries (other)  |     Version:  7.4.1                  
    Keywords:                     |          Os:  Unknown/Multiple       
Architecture:  Unknown/Multiple   |     Failure:  Runtime performance bug
  Difficulty:  Unknown            |    Testcase:                         
   Blockedby:                     |    Blocking:                         
     Related:                     |  
----------------------------------+-----------------------------------------
Changes (by milan):

 * cc: fox@… (added)


Comment:

 Hi,

 I also came across this bug.

 The problem is that with array-0.4.0.0, the RULEs for unsafeFreeze and
 unsafeThaw do not fire. The problem can be reproduced by copying the
 attached `Test` module to either array-0.3.0.3 or array-0.4.0.0 package
 and adding it to array.cabal. The `Test` module contains the following
 method:
 {{{
 test bounds = m
   where m = runSTUArray $ do
               a <- newArray bounds 0

               a' <- unsafeFreeze a
               a'' <- unsafeThaw a'
               let _ = a' :: UArray Int Int
                   _ = a'' `asTypeOf` a

               return a
 }}}
 Here are the results of compilation with GHC-7.4.1:
 {{{
 array-0.3.0.3
 Rule fired: Class op newArray
 Rule fired: unsafeFreeze/STUArray
 Rule fired: unsafeThaw/STUArray
 Rule fired: Class op return
 Rule fired: Class op >>=
 Rule fired: Class op >>=
 Rule fired: Class op >>=
 Rule fired: Class op rangeSize
 Rule fired: Class op rangeSize
 Rule fired: unpack-list
 }}}
 {{{
 array-0.4.0.0
 Rule fired: Class op newArray
 Rule fired: Class op return
 Rule fired: Class op >>=
 Rule fired: Class op >>=
 Rule fired: Class op >>=
 Rule fired: freeze/STUArray
 Rule fired: thaw/STUArray
 Rule fired: Class op rangeSize
 Rule fired: Class op rangeSize
 Rule fired: unpack-list
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to