- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkBufferFullSmallReads (0.14 sec)
-
src/bytes/buffer_test.go
var b Buffer b.Write(buf[0:1]) for i := 0; i < 5<<10; i++ { b.Write(buf) b.Read(buf) } } } // Check that we don't compact too often. From Issue 5154. func BenchmarkBufferFullSmallReads(b *testing.B) { buf := make([]byte, 1024) for i := 0; i < b.N; i++ { var b Buffer b.Write(buf) for b.Len()+20 < b.Cap() { b.Write(buf[:10]) } for i := 0; i < 5<<10; i++ {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0)