Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(client): prealloc pkg/varlog.(*transmitter).transmitQueue
This PR preallocates `pkg/varlog.(*transmitter).transmitQueue`. Benchmark: ``` goos: darwin goarch: amd64 pkg: github.com/kakao/varlog/pkg/varlog cpu: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz │ out.NoAlloc │ out.PreAlloc │ │ sec/op │ sec/op vs base │ TransmitQueue/128-8 17.88µ ± 1% 16.57µ ± 0% -7.34% (p=0.000 n=20) TransmitQueue/1024-8 149.7µ ± 0% 136.3µ ± 0% -8.93% (p=0.000 n=20) TransmitQueue/8192-8 1.313m ± 1% 1.156m ± 0% -11.97% (p=0.000 n=20) geomean 152.0µ 137.7µ -9.43% │ out.NoAlloc │ out.PreAlloc │ │ B/op │ B/op vs base │ TransmitQueue/128-8 14.40Ki ± 0% 12.29Ki ± 0% -14.65% (p=0.000 n=20) TransmitQueue/1024-8 138.40Ki ± 0% 98.04Ki ± 0% -29.16% (p=0.000 n=20) TransmitQueue/8192-8 1114.4Ki ± 0% 768.0Ki ± 0% -31.08% (p=0.000 n=20) geomean 130.5Ki 97.45Ki -25.31% │ out.NoAlloc │ out.PreAlloc │ │ allocs/op │ allocs/op vs base │ TransmitQueue/128-8 138.0 ± 0% 131.0 ± 0% -5.07% (p=0.000 n=20) TransmitQueue/1024-8 1.038k ± 0% 1.027k ± 0% -1.06% (p=0.000 n=20) TransmitQueue/8192-8 8.211k ± 0% 8.195k ± 0% -0.19% (p=0.000 n=20) geomean 1.056k 1.033k -2.13% ```
- Loading branch information