]> Cypherpunks repositories - gostls13.git/commit
encoding/base32: improve performance in common case
authorIlya Tocar <ilya.tocar@intel.com>
Tue, 1 Aug 2017 20:12:54 +0000 (15:12 -0500)
committerIlya Tocar <ilya.tocar@intel.com>
Mon, 14 Aug 2017 18:51:14 +0000 (18:51 +0000)
commit8b2f84393b50a2ac77ba36f847c52148f98b320f
tree9e335896a0592a96b00eb4486243d314e4117951
parent1f8433c66ae945f6d1e4a6bc8c6c5efebeae0dbe
encoding/base32: improve performance in common case

Unroll loop to improve perfromance back to 1.8 level.
name              old time/op    new time/op    delta
EncodeToString-6    63.0µs ± 3%    51.7µs ± 2%  -17.94%  (p=0.000 n=10+10)

name              old speed      new speed      delta
EncodeToString-6   130MB/s ± 3%   159MB/s ± 2%  +21.83%  (p=0.000 n=10+10)

Vs 1.8:
EncodeToString-6    54.9µs ± 2%    51.7µs ± 2%   -5.95%  (p=0.000 n=10+10)

name              old speed      new speed      delta
EncodeToString-6   149MB/s ± 2%   159MB/s ± 2%   +6.32%  (p=0.000 n=10+10)

Fixes #21262

Change-Id: I41bf7e1f61041781386d16d573bffe1a7173c0c3
Reviewed-on: https://go-review.googlesource.com/52510
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/encoding/base32/base32.go