Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If we don't have a leftover partial write in the buffer, we can skip the buffer completely and write directly to the logger. This improves performance when log statements aren't split across too many writes. ``` name old time/op new time/op delta Writer/single-4 422ns ±21% 383ns ± 2% -9.26% (p=0.000 n=10+9) Writer/splits-4 433ns ± 4% 435ns ± 1% ~ (p=0.236 n=9+8) name old alloc/op new alloc/op delta Writer/single-4 16.0B ± 0% 16.0B ± 0% ~ (all equal) Writer/splits-4 16.0B ± 0% 16.0B ± 0% ~ (all equal) name old allocs/op new allocs/op delta Writer/single-4 2.00 ± 0% 2.00 ± 0% ~ (all equal) Writer/splits-4 2.00 ± 0% 2.00 ± 0% ~ (all equal) ```
- Loading branch information