]> Cypherpunks repositories - gostls13.git/commit
math/big: slightly faster float->decimal conversion
authorRobert Griesemer <gri@golang.org>
Sat, 15 Oct 2016 00:09:54 +0000 (17:09 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 17 Oct 2016 19:33:33 +0000 (19:33 +0000)
commit92221fe8bc73ec6d487bd479f9739fdddb6fcada
tree227c84901192589cd165f4f4dbf40c9ae81c5893
parent984753b665875cd62f6144a42f6df58cb5f159a8
math/big: slightly faster float->decimal conversion

Inspired by Alberto Donizetti's observations in
https://go-review.googlesource.com/#/c/30099/.

name                 old time/op  new time/op  delta
DecimalConversion-8   138µs ± 1%   136µs ± 2%  -1.85%  (p=0.000 n=10+10)

10 runs each, measured on a Mac Mini, 2.3 GHz Intel Core i7.

Performance improvements varied between -1.25% to -4.4%; -1.85% is
about in the middle of the observed improvement. The generated code
is slightly shorter in the inner loops of the conversion code.

Change-Id: I10fb3b2843da527691c39ad5e5e5bd37ed63e2fa
Reviewed-on: https://go-review.googlesource.com/31250
Reviewed-by: Alan Donovan <adonovan@google.com>
src/math/big/decimal.go