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 598.08 595.89 1.00x
BenchmarkDecodeString/2-8 96.32 98.97 1.03x
BenchmarkDecodeString/4-8 174.19 180.41 1.04x
BenchmarkDecodeString/8-8 215.03 225.91 1.05x
BenchmarkDecodeString/64-8 496.53 548.24 1.10x
BenchmarkDecodeString/8192-8 778.83 916.62 1.18x
0 commit comments