#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):
I see. I guess the problem with #1042 was that x86 raises an exception on
int division overflow. IMO the right thing to do here is to use more bits
for division in the generated code. This is what gcc does, for instance.
I really don't like the overflow checks. They are inconsistent with the
rest of `Int` arithmetic and can have a big impact on the performance of
tight loops. I propose to get rid of them. This would require a patch to
base which is easy to do (I can do that) and a change to the NCG which is
probably a bit harder (I have no idea how to do this).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3065#comment:6>
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