integer-gmp: Make minusInteger more efficient
authorAlan Mock <alan@alanmock.com>
Fri, 3 Jun 2016 20:16:27 +0000 (22:16 +0200)
committerBen Gamari <ben@smart-cactus.org>
Sat, 4 Jun 2016 07:35:49 +0000 (09:35 +0200)
commit02f893eb4fe3f75f0a9dc7e723568f4c75de5785
tree37c8b38df14d99e8b9a625d3c1c2a95974bc0a33
parent079c1b8caed22db2be24f3304c56db56292670e1
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
libraries/integer-gmp/changelog.md
libraries/integer-gmp/src/GHC/Integer/Type.hs
testsuite/tests/lib/integer/all.T
testsuite/tests/lib/integer/plusMinusInteger.hs [new file with mode: 0644]
testsuite/tests/lib/integer/plusMinusInteger.stdout [new file with mode: 0644]
testsuite/tests/perf/should_run/all.T