]> Cypherpunks repositories - gostls13.git/commit
math/big: avoid unneeded sticky bit calculations
authorBrian Kessler <brian.m.kessler@gmail.com>
Wed, 9 Aug 2017 07:09:07 +0000 (00:09 -0700)
committerRobert Griesemer <gri@golang.org>
Fri, 11 Aug 2017 09:52:30 +0000 (09:52 +0000)
commit9c7bf0807a56429a92c4518f90d3418609688cbb
tree613fb5a126ee3d0f9ff98661144f4e29c3c7415a
parente9348ab4e9c8c189036ef405d73528ca50a6f785
math/big: avoid unneeded sticky bit calculations

As noted in the TODO comment, the sticky bit is only used
when the rounding bit is zero or the rounding mode is
ToNearestEven.  This change makes that check explicit and
will eliminate half the sticky bit calculations on average
when rounding mode is not ToNearestEven.

Change-Id: Ia4709f08f46e682bf97dabe5eb2a10e8e3d7af43
Reviewed-on: https://go-review.googlesource.com/54111
Reviewed-by: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
src/math/big/float.go