[GHC] #8647: Reduce allocations in `integer-gmp`

GHC ghc-devs at haskell.org
Sat Jan 4 21:54:04 UTC 2014


#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 Herbert Valerio Riedel <hvr@…>):

 In [changeset:"8bf9541912c30ffb740d6ab67edcadcfbe4fc80b/integer-gmp"]:
 {{{
 #!CommitTicketReference repository="integer-gmp"
 revision="8bf9541912c30ffb740d6ab67edcadcfbe4fc80b"
 Add new `mpz_{sub,add}_ui`-based primop (re #8647)

 This adds `{plus,minus}IntegerInt#` which help to reduce temporary
 allocations in `plusInteger` and `minusInteger`.

 This and the previous commit introducing `timesIntegerInt#` (i.e.
 baeeef7af6e)
 result in reduced allocations for the following nofib benchmarks on
 Linux/amd64:

          Program      Size    Allocs   Runtime   Elapsed  TotalMem
   ------------------------------------------------------------------
       bernouilli     +0.0%     -4.2%      0.12      0.12     +0.0%
            kahan     +0.1%    -12.6%      0.17      0.17     +0.0%
         pidigits     +0.0%     -0.5%     -4.7%     -4.5%     +0.0%
            power     +0.0%     -2.7%     +3.1%     +3.1%     +9.1%
        primetest     +0.0%     -4.2%      0.07      0.07     +0.0%
              rsa     +0.0%     -4.1%      0.02      0.02     +0.0%
              scs     +0.0%     -2.6%     -0.8%     -0.7%     +0.0%
   ------------------------------------------------------------------
              Min     +0.0%    -12.6%     -4.7%     -4.5%     -5.0%
              Max     +0.1%     +0.2%     +3.1%     +3.1%     +9.1%
   Geometric Mean     +0.1%     -0.3%     -0.0%     +0.0%     +0.1%
   ------------------------------------------------------------------

 Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8647#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list