snowflake/common
David Fifield 2321642f3c Hoist temporary buffers outside the loop.
Otherwise the buffers are re-allocated on every iteration, which is a
surprise to me. I thought the compiler would do this transformation
itself.

Now there is just one allocation per client←server read (one
messageReader) and two allocations per server←client read (one
messageReader and one messageWriter).

	$ go test -bench=BenchmarkReadWrite -benchmem -benchtime=5s
	BenchmarkReadWrite/c←s_150-4              481054             12849 ns/op          11.67 MB/s           8 B/op          1 allocs/op
	BenchmarkReadWrite/s←c_150-4              421809             14095 ns/op          10.64 MB/s          56 B/op          2 allocs/op
	BenchmarkReadWrite/c←s_3000-4             208564             28003 ns/op         107.13 MB/s          16 B/op          2 allocs/op
	BenchmarkReadWrite/s←c_3000-4             186320             30576 ns/op          98.12 MB/s         112 B/op          4 allocs/op
2022-11-16 13:48:34 -07:00
..
amp format using go-1.19 2022-10-09 21:15:50 +02:00
bridgefingerprint Represent Bridge Fingerprint As String 2022-06-16 14:06:58 +01:00
encapsulation format using go-1.19 2022-10-09 21:15:50 +02:00
event Use event logger for proxy starting message and NAT info 2022-11-16 10:08:10 -08:00
ipsetsink Use truncated hash instead crc64 for counted hash 2022-06-16 15:00:12 +01:00
messages format using go-1.19 2022-10-09 21:15:50 +02:00
namematcher Update Relay Pattern format to include dollar sign 2022-06-16 14:06:58 +01:00
nat Wrap client NAT log 2022-05-31 08:52:23 -07:00
safelog format using go-1.19 2022-10-09 21:15:50 +02:00
task Wait some time before displaying the proxy usage log 2022-05-25 11:01:01 -04:00
turbotunnel Increase smux and QueuePacketConn buffer sizes 2021-08-10 15:38:11 -04:00
util Bump version of pion/sdp 2021-01-25 10:28:17 -05:00
utls Don't use entropy for test 2022-06-02 17:24:54 +02:00
websocketconn Hoist temporary buffers outside the loop. 2022-11-16 13:48:34 -07:00