1
0
mirror of https://git.zx2c4.com/wireguard-go synced 2024-11-15 01:05:15 +01:00
wireguard-go/conn
Josh Bleecher Snyder ef5c587f78 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>
2022-04-07 03:31:10 +02:00
..
bindtest all: update to Go 1.18 2022-03-16 16:09:48 -07:00
winrio global: apply gofumpt 2021-12-09 23:15:55 +01:00
bind_linux.go all: update to Go 1.18 2022-03-16 16:09:48 -07:00
bind_std.go conn: remove the final alloc per packet receive 2022-04-07 03:31:10 +02:00
bind_windows.go all: update to Go 1.18 2022-03-16 16:09:48 -07:00
boundif_android.go conn: make binds replacable 2021-02-23 20:00:57 +01:00
conn.go all: update to Go 1.18 2022-03-16 16:09:48 -07:00
default.go global: remove old-style build tags 2021-10-12 12:02:10 -06:00
mark_default.go global: remove old-style build tags 2021-10-12 12:02:10 -06:00
mark_unix.go global: remove old-style build tags 2021-10-12 12:02:10 -06:00