-
- Downloads
Take ownership of buffer in QueuePacketConn.WriteTo.
Like the corresponding change to QueuePacketConn.QueueIncoming, this is more efficient when the caller does not reuse the buffer. Before: $ go test -bench=BenchmarkWriteTo -benchtime 2s -benchmem BenchmarkWriteTo-4 3777459 627 ns/op 1024 B/op 2 allocs/op After: $ go test -bench=BenchmarkWriteTo -benchtime 2s -benchmem BenchmarkWriteTo-4 6702324 373 ns/op 512 B/op 1 allocs/op
Please register or sign in to comment