#3245: Quadratic slowdown in Data.Typeable
--------------------------------------+-------------------------------------
 Reporter:  guest                     |          Owner:        
     Type:  run-time performance bug  |         Status:  new   
 Priority:  normal                    |      Milestone:        
Component:  libraries (other)         |        Version:  6.10.1
 Severity:  major                     |     Resolution:        
 Keywords:                            |       Testcase:        
       Os:  Linux                     |   Architecture:  x86   
--------------------------------------+-------------------------------------
Comment (by guest):

 As demonstration that the slowness in the cast is from the typeOf call see
 the attached {{{TypeOfSpeed.hs}}}.

 Example run:
 {{{
 $ ghc --make -O3 TypeOfSpeed.hs
 [1 of 1] Compiling Main             ( TypeOfSpeed.hs, TypeOfSpeed.o )
 Linking TypeOfSpeed ...
 $ ./TypeOfSpeed 20000
 count1
 Result: 20000
 Time(sec): 9.998e-3
 Result: 20000
 Time(sec): 2.0e-3
 Result: 20000
 Time(sec): 2.0e-3

 count2
 Result: 20000
 Time(sec): 1.455779
 Result: 20000
 Time(sec): 1.414784
 Result: 20000
 Time(sec): 1.415785
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3245#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