
#10691: certain operations in new integer-gmp are too lazy -------------------------------------+------------------------------------- Reporter: rwbarton | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: libraries | Version: 7.10.1 (other) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:2 rwbarton]:
You can still save the work of doing a multiplication in GMP, you just have to force evaluation of the other argument when you do so.
I'm not sure I understand that; a multiplication with 0 would have made no sense to dispatched a call into GMP anyway, that's not the cost I'm worried about. It's rather forcing of the other argument that may trigger all sorts of potentially costly evaluations and GMP-calls only to ultimately absorb it into a `0`-result... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10691#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler