]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
conn: remove the final alloc per packet receive
authorJosh Bleecher Snyder <josh@tailscale.com>
Tue, 22 Mar 2022 18:23:56 +0000 (11:23 -0700)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Apr 2022 01:31:10 +0000 (03:31 +0200)
commitef5c587f782d944005971c7ba5da88405f9b000b
treeff47ca70bb35114ec14ffea4edfa30391eadc02c
parent193cf8d6a5d6b8844d7f9b33b2d0ecb46098255e
conn: remove the final alloc per packet receive

This does bind_std only; other platforms remain.

The remaining alloc per iteration in the Throughput benchmark
comes from the tuntest package, and should not appear in regular use.

name           old time/op      new time/op      delta
Latency-10         25.2µs ± 1%      25.0µs ± 0%   -0.58%  (p=0.006 n=10+10)
Throughput-10      2.44µs ± 3%      2.41µs ± 2%     ~     (p=0.140 n=10+8)

name           old alloc/op     new alloc/op     delta
Latency-10           854B ± 5%        741B ± 3%  -13.22%  (p=0.000 n=10+10)
Throughput-10        265B ±34%        267B ±39%     ~     (p=0.670 n=10+10)

name           old allocs/op    new allocs/op    delta
Latency-10           16.0 ± 0%        14.0 ± 0%  -12.50%  (p=0.000 n=10+10)
Throughput-10        2.00 ± 0%        1.00 ± 0%  -50.00%  (p=0.000 n=10+10)

name           old packet-loss  new packet-loss  delta
Throughput-10        0.01 ±82%       0.01 ±282%     ~     (p=0.321 n=9+8)

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
conn/bind_std.go