- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BenchmarkReaderWriteToOptimal (0.16 sec)
-
src/bufio/bufio_test.go
dstBuf := new(bytes.Buffer) dst := onlyWriter{dstBuf} for i := 0; i < b.N; i++ { srcBuf.Reset() srcReader.Reset(srcBuf) dstBuf.Reset() io.Copy(dst, src) } } func BenchmarkReaderWriteToOptimal(b *testing.B) { const bufSize = 16 << 10 buf := make([]byte, bufSize) r := bytes.NewReader(buf) srcReader := NewReaderSize(onlyReader{r}, 1<<10) if _, ok := io.Discard.(io.ReaderFrom); !ok {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Nov 01 21:52:12 UTC 2024 - 51.6K bytes - Viewed (0)