encoding/base64: improve performance up to 20% total
Improve base64 encoding/decoding performance by suppressing compiler boundary checks on decode. name old speed new speed delta EncodeToString-8 570MB/s ± 1% 573MB/s ± 1% ~ (p=0.421 n=5+5) DecodeString/2-8 88.6MB/s ± 3% 91.6MB/s ± 2% +3.37% (p=0.016 n=5+5) DecodeString/4-8 162MB/s ± 1% 168MB/s ± 0% +4.12% (p=0.008 n=5+5) DecodeString/8-8 203MB/s ± 0% 214MB/s ± 0% +5.18% (p=0.008 n=5+5) DecodeString/64-8 471MB/s ± 1% 520MB/s ± 1% +10.50% (p=0.008 n=5+5) DecodeString/8192-8 757MB/s ± 0% 895MB/s ± 1% +18.29% (p=0.008 n=5+5) Change-Id: I135243c11aa4c974a4a4e95c5c2abb0635d52c8c GitHub-Last-Rev: 2c87abcb287f4459888941ae2633edcd8eb5b79d GitHub-Pull-Request: golang/go#36910 Reviewed-on: https://go-review.googlesource.com/c/go/+/217117 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:Ian Lance Taylor <iant@golang.org>
Loading
Please sign in to comment