- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkBufferWriteBlock (0.1 sec)
-
src/bytes/buffer_test.go
var b Buffer b.Write(buf) for b.Len()+20 < b.Cap() { b.Write(buf[:10]) } for i := 0; i < 5<<10; i++ { b.Read(buf[:1]) b.Write(buf[:1]) } } } func BenchmarkBufferWriteBlock(b *testing.B) { block := make([]byte, 1024) for _, n := range []int{1 << 12, 1 << 16, 1 << 20} { b.Run(fmt.Sprintf("N%d", n), func(b *testing.B) { b.ReportAllocs() for i := 0; i < b.N; 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)