Hacking the Go compiler to efficiently map IPv4 to IPv6: vincent.bernat.ch/en/blog/2026.... This post digs in how to modify the Go compiler to reduce netip.AddrFrom16()+netip.As16() to almost nothing, first through the noding process, then with rewrite rules for the SSA form.
Hacking the Go compiler to efficiently map IPv4 to IPv6
Go maintainers declined netip.Addr.Map() saying the compiler should optimize netip.AddrFrom16(ip.As16()) instead. How difficult is it to implement?
vincent.bernat.ch