net: precompute rfc6724policyTable in addrselect #54032
Labels
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
As net package has one of the biggest init time in standard library, I have tried to improve performance by doing two things in
net/addrselect.go
:net
module.sortByRFC6724
function. It results in ~40% performance improvement on samples from tests.The only risk is the difference between net.IP and netip.Addr behaviour.
Init benchmark:
Whole sortByRFC6724 function benchmark:
The text was updated successfully, but these errors were encountered: