improve random bytes buffer hanlding for package grand

This commit is contained in:
john
2020-06-04 14:45:56 +08:00
parent 9cad9e4467
commit c4e599ce63

View File

@ -39,7 +39,8 @@ func asyncProducingRandomBufferBytesLoop() {
// so fully reuse the random buffer by changing
// the step with a different number can
// improve the performance a lot.
for _, step = range []int{4, 5, 6, 7} {
// for _, step = range []int{4, 5, 6, 7} {
for _, step = range []int{4} {
for i := 0; i <= n-4; i += step {
bufferChan <- buffer[i : i+4]
}