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>
Showing
Please
register
or
sign in
to comment