wireguard-go/tun
Jordan Whited 895d6c23cd tun: unwind summing loop in checksumNoFold()
$ benchstat old.txt new.txt
goos: linux
goarch: amd64
pkg: golang.zx2c4.com/wireguard/tun
cpu: 12th Gen Intel(R) Core(TM) i5-12400
                 │   old.txt    │               new.txt               │
                 │    sec/op    │   sec/op     vs base                │
Checksum/64-12     10.670n ± 2%   4.769n ± 0%  -55.30% (p=0.000 n=10)
Checksum/128-12    19.665n ± 2%   8.032n ± 0%  -59.16% (p=0.000 n=10)
Checksum/256-12     37.68n ± 1%   16.06n ± 0%  -57.37% (p=0.000 n=10)
Checksum/512-12     76.61n ± 3%   32.13n ± 0%  -58.06% (p=0.000 n=10)
Checksum/1024-12   160.55n ± 4%   64.25n ± 0%  -59.98% (p=0.000 n=10)
Checksum/1500-12   231.05n ± 7%   94.12n ± 0%  -59.26% (p=0.000 n=10)
Checksum/2048-12    309.5n ± 3%   128.5n ± 0%  -58.48% (p=0.000 n=10)
Checksum/4096-12    603.8n ± 4%   257.2n ± 0%  -57.41% (p=0.000 n=10)
Checksum/8192-12   1185.0n ± 3%   515.5n ± 0%  -56.50% (p=0.000 n=10)
Checksum/9000-12   1328.5n ± 5%   564.8n ± 0%  -57.49% (p=0.000 n=10)
Checksum/9001-12   1340.5n ± 3%   564.8n ± 0%  -57.87% (p=0.000 n=10)
geomean             185.3n        77.99n       -57.92%

Reviewed-by: Adrian Dewhurst <adrian@tailscale.com>
Signed-off-by: Jordan Whited <jordan@tailscale.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2023-10-10 15:07:36 +02:00
..
netstack netstack: fix typo 2023-07-04 15:56:30 +02:00
testdata/fuzz/Fuzz_handleGRO conn, device, tun: implement vectorized I/O on Linux 2023-03-10 14:52:17 +01:00
tuntest conn, device, tun: implement vectorized I/O plumbing 2023-03-10 14:52:13 +01:00
alignment_windows_test.go global: bump copyright year 2023-02-07 20:39:29 -03:00
checksum_test.go tun: unwind summing loop in checksumNoFold() 2023-10-10 15:07:36 +02:00
checksum.go tun: unwind summing loop in checksumNoFold() 2023-10-10 15:07:36 +02:00
errors.go tun: replace ErrorBatch() with errors.Join() 2023-03-17 15:18:04 +01:00
operateonfd.go global: bump copyright year 2023-02-07 20:39:29 -03:00
tcp_offload_linux_test.go tun: use correct IP header comparisons in tcpGRO() and tcpPacketsCanCoalesce() 2023-03-25 23:13:38 +01:00
tcp_offload_linux.go tun: use correct IP header comparisons in tcpGRO() and tcpPacketsCanCoalesce() 2023-03-25 23:13:38 +01:00
tun_darwin.go global: buff -> buf 2023-03-13 17:55:53 +01:00
tun_freebsd.go global: buff -> buf 2023-03-13 17:55:53 +01:00
tun_linux.go tun: replace ErrorBatch() with errors.Join() 2023-03-17 15:18:04 +01:00
tun_openbsd.go global: buff -> buf 2023-03-13 17:55:53 +01:00
tun_windows.go global: buff -> buf 2023-03-13 17:55:53 +01:00
tun.go global: buff -> buf 2023-03-13 17:55:53 +01:00