[GHC] #8647: Reduce allocations in `integer-gmp`
GHC
ghc-devs at haskell.org
Mon Jan 13 16:35:24 UTC 2014
#8647: Reduce allocations in `integer-gmp`
--------------------------------------------+------------------------------
Reporter: hvr | Owner:
Type: task | Status: patch
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:"cbde86278d2090e19e62f0dd22682b4381433658/integer-gmp"]:
{{{
#!CommitTicketReference repository="integer-gmp"
revision="cbde86278d2090e19e62f0dd22682b4381433658"
Wrap `gmpz_fdiv_{q,r,qr}_ui` to optimize `div`/`mod`
This is similiar to what has been done in [af2ba9c8/integer-gmp] for
`gmpz_tdiv_{q,r,qr}_ui` (re #8647); However, the gain is more modest
here, as performance-conscious code tends to use `quot`/`rem` rather
than `div`/`mod`:
Program Size Allocs Runtime Elapsed TotalMem
-------------------------------------------------------------
primetest +0.3% -2.4% 0.06 0.06 +0.0%
rsa +0.2% -3.3% 0.02 0.02 +0.0%
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8647#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list