mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
improve random bytes buffer hanlding for package grand
This commit is contained in:
@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user