-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net,net/netip: implement the encoding.(Binary|Text)Appender #69022
Conversation
This PR (HEAD: 4ebb58e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
4ebb58e
to
75e6f0d
Compare
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
This PR (HEAD: 75e6f0d) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from kyose chang: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Ian Lance Taylor: Patch Set 2: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Mateusz Poliwczak: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Mateusz Poliwczak: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
75e6f0d
to
ac1d994
Compare
This PR (HEAD: ac1d994) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from kyose chang: Patch Set 2: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Damien Neil: Patch Set 3: (4 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
ac1d994
to
7c3dd9b
Compare
This PR (HEAD: 7c3dd9b) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from kyose chang: Patch Set 4: (3 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
7c3dd9b
to
3268c0d
Compare
Message from kyose chang: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
This PR (HEAD: 3268c0d) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from Ian Lance Taylor: Patch Set 5: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Go LUCI: Patch Set 5: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-08-23T00:32:54Z","revision":"c863dfcaebad119aa69037e73dd31809ca06a48c"} Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Ian Lance Taylor: Patch Set 5: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Go LUCI: Patch Set 5: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Go LUCI: Patch Set 5: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from kyose chang: Patch Set 5: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
3268c0d
to
2e7adac
Compare
This PR (HEAD: 2e7adac) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from kyose chang: Patch Set 6: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
2e7adac
to
e66bcef
Compare
This PR (HEAD: e66bcef) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from Ian Lance Taylor: Patch Set 7: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Implement the encoding.TextAppender interface for "net.IP". Implement the encoding.(Binary|Text)Appender interfaces for "netip.Addr", "netip.AddrPort" and "netip.Prefix". "net.IP.MarshalText" gets some performance improvements: │ old │ new │ │ sec/op │ sec/op vs base │ IPMarshalText/IPv4-8 66.06n ± 1% 14.55n ± 1% -77.97% (p=0.000 n=10) IPMarshalText/IPv6-8 117.00n ± 1% 63.18n ± 1% -46.00% (p=0.000 n=10) IPMarshalText/IPv6_long-8 137.8n ± 1% 111.3n ± 1% -19.27% (p=0.000 n=10) geomean 102.1n 46.77n -54.21% │ old │ new │ │ B/op │ B/op vs base │ IPMarshalText/IPv4-8 32.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6-8 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6_long-8 96.00 ± 0% 48.00 ± 0% -50.00% (p=0.000 n=10) │ old │ new │ │ allocs/op │ allocs/op vs base │ IPMarshalText/IPv4-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6_long-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=10) All exported types in the standard library that implement the "encoding.(Binary|Text)Marshaler" now also implement the "encoding.(Binary|Text)Appender". Fixes golang#62384
e66bcef
to
5d27854
Compare
This PR (HEAD: 5d27854) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/607520. Important tips:
|
Message from kyose chang: Patch Set 7: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Ian Lance Taylor: Patch Set 8: Auto-Submit+1 Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Go LUCI: Patch Set 8: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-09-20T21:17:55Z","revision":"dfae05efcafef87101cf7157a7a88c4a2da60ca2"} Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Ian Lance Taylor: Patch Set 8: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Go LUCI: Patch Set 8: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from Go LUCI: Patch Set 8: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Message from kyose chang: Patch Set 8: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
Implement the encoding.TextAppender interface for "net.IP". Implement the encoding.(Binary|Text)Appender interfaces for "netip.Addr", "netip.AddrPort" and "netip.Prefix". "net.IP.MarshalText" also gets some performance improvements: │ old │ new │ │ sec/op │ sec/op vs base │ IPMarshalText/IPv4-8 66.06n ± 1% 14.55n ± 1% -77.97% (p=0.000 n=10) IPMarshalText/IPv6-8 117.00n ± 1% 63.18n ± 1% -46.00% (p=0.000 n=10) IPMarshalText/IPv6_long-8 137.8n ± 1% 111.3n ± 1% -19.27% (p=0.000 n=10) geomean 102.1n 46.77n -54.21% │ old │ new │ │ B/op │ B/op vs base │ IPMarshalText/IPv4-8 32.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6-8 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6_long-8 96.00 ± 0% 48.00 ± 0% -50.00% (p=0.000 n=10) │ old │ new │ │ allocs/op │ allocs/op vs base │ IPMarshalText/IPv4-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) IPMarshalText/IPv6_long-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=10) All exported types in the standard library that implement the "encoding.(Binary|Text)Marshaler" now also implement the "encoding.(Binary|Text)Appender". Fixes #62384 Change-Id: I7d3da8c5736a1ab9c54b9ac4bd2fbf850f9d1bd0 GitHub-Last-Rev: 5d27854 GitHub-Pull-Request: #69022 Reviewed-on: https://go-review.googlesource.com/c/go/+/607520 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
Message from David Chase: Patch Set 8: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/607520. |
This PR is being closed because golang.org/cl/607520 has been merged. |
Implement the encoding.TextAppender interface for "net.IP".
Implement the encoding.(Binary|Text)Appender interfaces for
"netip.Addr", "netip.AddrPort" and "netip.Prefix".
"net.IP.MarshalText" also gets some performance improvements:
IPMarshalText/IPv4-8 66.06n ± 1% 14.55n ± 1% -77.97% (p=0.000 n=10)
IPMarshalText/IPv6-8 117.00n ± 1% 63.18n ± 1% -46.00% (p=0.000 n=10)
IPMarshalText/IPv6_long-8 137.8n ± 1% 111.3n ± 1% -19.27% (p=0.000 n=10)
geomean 102.1n 46.77n -54.21%
IPMarshalText/IPv4-8 32.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
IPMarshalText/IPv6-8 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
IPMarshalText/IPv6_long-8 96.00 ± 0% 48.00 ± 0% -50.00% (p=0.000 n=10)
IPMarshalText/IPv4-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
IPMarshalText/IPv6-8 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
IPMarshalText/IPv6_long-8 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=10)
All exported types in the standard library that implement the
"encoding.(Binary|Text)Marshaler" now also implement the
"encoding.(Binary|Text)Appender".
Fixes #62384