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 (
The text was updated successfully, but these errors were encountered:
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.