diff options
author | Reid Barton <rwbarton@gmail.com> | 2017-01-30 11:59:28 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-01-30 14:02:34 -0500 |
commit | f984bf2e1deedb4931c0c2d5b6b5128b8b154cb5 (patch) | |
tree | dd2dfe2c3273c56df8c89f045df2f1556a3357d8 /iserv/Makefile | |
parent | 5f8e23444caf7a3d085cd8d97762dc3ed777c297 (diff) | |
download | haskell-f984bf2e1deedb4931c0c2d5b6b5128b8b154cb5.tar.gz |
Simplify minusInteger in integer-gmp slightly
These two special cases were created in D2278 by mechanically
inlining negateInteger into plusInteger. They aren't needed
(the `minusInteger (S# x#) (S# y#)` case already handles all values
correctly), and they can never help by avoiding an allocation,
unlike the original special case in plusInteger, since we still
have to allocate the result.
Removing these special cases will save a couple comparisons and
conditional branches in the common case of subtracting two small
Integers.
Test Plan:
Existing test `plusMinusInteger` already tests
the values in question.
Reviewers: bgamari, goldfire, austin, hvr
Reviewed By: bgamari, hvr
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3034
Diffstat (limited to 'iserv/Makefile')
0 files changed, 0 insertions, 0 deletions