#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 simonmar):

 All things being equal, we should expose the test to GHC because that
 enables more intelligent decisions to be made in the simplifier and the
 code generator.  If it results in bad loop code, we should fix that,
 rather than work around it by making the test part of the primitive.

 The narrower Int types have their own implementations of `quot`, which
 currently include an overflow test.  It might be possible in those cases
 to just omit the test, although that would make the behaviour of `Int32`
 on a 64-bit platform different from on a 32-bit platform in this
 particular case.

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