[GHC] #12129: Optimize the implementation of minusInteger in the integer-gmp package
#12129: Optimize the implementation of minusInteger in the integer-gmp package -------------------------------------+------------------------------------- Reporter: admock | Owner: Type: task | Status: new Priority: normal | Milestone: Component: libraries | Version: 8.0.1 (other) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Runtime Unknown/Multiple | performance bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- As mentioned in [https://www.fpcomplete.com/blog/2016/05/weigh-package], the current implementation of `minusInteger` is {{{#!hs minusInteger x y = inline plusInteger x (inline negateInteger y) }}} which always allocates an additional integer. This could be improved by not always calling `negateInteger` and instead having an implementation more like `plusInteger`'s. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12129> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12129: Optimize the implementation of minusInteger in the integer-gmp package -------------------------------------+------------------------------------- Reporter: admock | Owner: admock Type: task | Status: new Priority: normal | Milestone: Component: libraries | Version: 8.0.1 (other) | Resolution: | Keywords: integer-gmp Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by hvr): * owner: => admock * keywords: => integer-gmp -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12129#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12129: Optimize the implementation of minusInteger in the integer-gmp package -------------------------------------+------------------------------------- Reporter: admock | Owner: admock Type: task | Status: new Priority: normal | Milestone: Component: libraries | Version: 8.0.1 (other) | Resolution: | Keywords: integer-gmp Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2278 Wiki Page: | -------------------------------------+------------------------------------- Changes (by admock): * differential: => Phab:D2278 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12129#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12129: Optimize the implementation of minusInteger in the integer-gmp package -------------------------------------+------------------------------------- Reporter: admock | Owner: admock Type: task | Status: new Priority: normal | Milestone: Component: libraries | Version: 8.0.1 (other) | Resolution: | Keywords: integer-gmp Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2278 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"02f893eb4fe3f75f0a9dc7e723568f4c75de5785/ghc" 02f893eb/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="02f893eb4fe3f75f0a9dc7e723568f4c75de5785" integer-gmp: Make minusInteger more efficient Give `minusInteger` its own implementation. Previously `minusInteger` used `plusInteger` and `negateInteger`, which meant it always allocated. Now it works more like `plusInteger`. Reviewers: goldfire, hvr, bgamari, austin Reviewed By: hvr, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2278 GHC Trac Issues: #12129 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12129#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12129: Optimize the implementation of minusInteger in the integer-gmp package -------------------------------------+------------------------------------- Reporter: admock | Owner: admock Type: task | Status: new Priority: normal | Milestone: 8.2.1 Component: libraries | Version: 8.0.1 (other) | Resolution: | Keywords: integer-gmp Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2278 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.2.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12129#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12129: Optimize the implementation of minusInteger in the integer-gmp package -------------------------------------+------------------------------------- Reporter: admock | Owner: admock Type: task | Status: closed Priority: normal | Milestone: 8.2.1 Component: libraries | Version: 8.0.1 (other) | Resolution: fixed | Keywords: integer-gmp Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2278 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12129#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC