Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: IPv4 String method is not efficient and could be improved #24306
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
I have a better implementation. https://play.golang.org/p/-LG8jshs4ak
Also did BenchMark test:
../bin/go test -bench=BenchmarkIPString -run=^ip ./net/
This is optimization namely for IPv4 and it gives ~75% improvement.