It's interesting how they found the unused code. Are there enough real world participants who would allow tracing in order to understand what other codeblocks are unused in the real world and put in deprecation notices? I kind of wonder what percentage of the code is nominally functional but never actually used even in the wild.
> So per that messaging, the UDP-Lite code really hasn't been used in years and doing away with it can net some measurable (+3~10% packets per second) for other UDP workloads.
Often times removing deprecated code is purely for developer purity. You just don’t want it lying around.
But 3-10% pps improvement is quite an achievement for removing some branches.
> By removing a bunch of conditionals for UDP-Lite from the fast path, udp_rr with 20,000 flows sees a 10% increase in pps (13.3 Mpps -> 14.7 Mpps) on an AMD EPYC 7B12 (Zen 2) 64-Core Processor platform.
Considering the number linux udp sockets in the wild this is huge. It’s a shame C/compilers can’t optimize this away though without entirely removing the code, this is exactly why zig’s comptime exists.
6 comments
[ 0.15 ms ] story [ 32.2 ms ] threadOften times removing deprecated code is purely for developer purity. You just don’t want it lying around.
But 3-10% pps improvement is quite an achievement for removing some branches.
Considering the number linux udp sockets in the wild this is huge. It’s a shame C/compilers can’t optimize this away though without entirely removing the code, this is exactly why zig’s comptime exists.