You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
base64: avoid compliler boundary checks in the hot loop
Unfortunately compiler is not capable to realise that boundary checks
are not necessary on each src[si+N] access.
Selection of sub-slice helps.
benchmark old MB/s new MB/s speedup
BenchmarkEncodeToString-8 678.24 675.38 1.00x
BenchmarkDecodeString/2-8 111.61 109.20 0.98x
BenchmarkDecodeString/4-8 183.22 195.49 1.07x
BenchmarkDecodeString/8-8 249.11 249.52 1.00x
BenchmarkDecodeString/64-8 653.02 697.99 1.07x
BenchmarkDecodeString/8192-8 950.17 1028.51 1.08x
0 commit comments