- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkBufferNotEmptyWriteRead (0.14 sec)
-
src/bytes/buffer_test.go
buf := NewBuffer(make([]byte, n*utf8.UTFMax)) for i := 0; i < b.N; i++ { buf.Reset() for i := 0; i < n; i++ { buf.WriteRune(r) } } } // From Issue 5154. func BenchmarkBufferNotEmptyWriteRead(b *testing.B) { buf := make([]byte, 1024) for i := 0; i < b.N; i++ { var b Buffer b.Write(buf[0:1]) for i := 0; i < 5<<10; i++ { b.Write(buf) b.Read(buf) } } }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0)