tweak: optimize memory usage under load

This commit is contained in:
yusing
2025-05-24 22:05:42 +08:00
parent 5b7c392297
commit f0ab14cb1e
5 changed files with 127 additions and 104 deletions

View File

@@ -4,7 +4,7 @@ import (
"testing"
)
var sizes = []int{1024, 4096, 16384, 65536, 32 * 1024, 128 * 1024, 512 * 1024, 1024 * 1024}
var sizes = []int{1024, 4096, 16384, 65536, 32 * 1024, 128 * 1024, 512 * 1024, 1024 * 1024, 2 * 1024 * 1024}
func BenchmarkBytesPool_GetSmall(b *testing.B) {
for b.Loop() {