
#8647: Reduce allocations in `integer-gmp` --------------------------------------------+------------------------------ Reporter: hvr | Owner: Type: task | Status: new Priority: normal | Milestone: 7.8.1 Component: libraries (other) | Version: 7.6.3 Resolution: | Keywords: integer- Operating System: Unknown/Multiple | gmp Type of failure: Runtime performance bug | Architecture: x86_64 Test Case: | (amd64) Blocking: | Difficulty: Unknown | Blocked By: | Related Tickets: #8638 --------------------------------------------+------------------------------ Comment (by hvr): The two commits above implement the 2nd of the two proposed optimizations in the ticket description, the avoid-reallocations-optimization is a bit more difficult to get implemented properly (but I'm still working on it). Btw, this optimization helps also in cases, when several small-ints are added/multiplied to an accumulator as in e.g.: {{{#!hs sum (toInteger (maxBound :: Int) : [1..10000]) -- or product [1..100] }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8647#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler