#3065: Reorder tests in quot to improve code
--------------------------------------+-------------------------------------
  Reporter:  simonpj                  |          Owner:                  
      Type:  bug                      |         Status:  new             
  Priority:  normal                   |      Milestone:  6.12 branch     
 Component:  libraries/base           |        Version:  6.10.1          
Resolution:                           |       Keywords:                  
Difficulty:  Unknown                  |             Os:  Unknown/Multiple
  Testcase:                           |   Architecture:  Unknown/Multiple
   Failure:  Runtime performance bug  |  
--------------------------------------+-------------------------------------
Comment (by rl):

 In general, I agree with you but IMO things are far from equal here. The
 test is only there because of one particular quirk of one particular
 processor architecture. It isn't needed on the Sparc, for instance. There,
 we pay a performance penalty for no reason at all. Even on x86, it isn't
 needed for small integer types and I suspect it isn't needed for Int64 on
 x86-32. IMO, things like that are best handled by the processor-specific
 backend. The code generator should still be able to see the test. The
 simplifier isn't doing anything clever with it anyway and I don't see that
 changing in the near future (see, for instance #2132).

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