-
Notifications
You must be signed in to change notification settings - Fork 18.4k
encoding/xml: make use of reflect.TypeAssert #75483
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
base: master
Are you sure you want to change the base?
Conversation
This PR (HEAD: ef82168) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/704215. Important tips:
|
Message from Keith Randall: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
ef82168
to
b2a4aa4
Compare
Message from kyose chang: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
This PR (HEAD: b2a4aa4) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/704215. Important tips:
|
b2a4aa4
to
62e6b63
Compare
Message from kyose chang: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
This PR (HEAD: 62e6b63) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/704215. Important tips:
|
Message from Keith Randall: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
Message from Keith Randall: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
Message from kyose chang: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
Message from kyose chang: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
Message from Keith Randall: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
To simplify the code and improve performance: goos: darwin goarch: arm64 pkg: encoding/xml cpu: Apple M4 │ old │ new │ │ sec/op │ sec/op vs base │ Marshal-10 1.902µ ± 1% 1.496µ ± 1% -21.37% (p=0.000 n=10) Unmarshal-10 3.877µ ± 1% 3.418µ ± 2% -11.84% (p=0.000 n=10) HTMLAutoClose-10 1.314µ ± 3% 1.333µ ± 1% ~ (p=0.270 n=10) geomean 2.132µ 1.896µ -11.07% │ old │ new │ │ B/op │ B/op vs base │ Marshal-10 5.570Ki ± 0% 5.570Ki ± 0% ~ (p=1.000 n=10) ¹ Unmarshal-10 7.586Ki ± 0% 7.555Ki ± 0% -0.41% (p=0.000 n=10) HTMLAutoClose-10 3.496Ki ± 0% 3.496Ki ± 0% ~ (p=1.000 n=10) ¹ geomean 5.286Ki 5.279Ki -0.14% ¹ all samples are equal │ old │ new │ │ allocs/op │ allocs/op vs base │ Marshal-10 23.00 ± 0% 23.00 ± 0% ~ (p=1.000 n=10) ¹ Unmarshal-10 185.0 ± 0% 184.0 ± 0% -0.54% (p=0.000 n=10) HTMLAutoClose-10 93.00 ± 0% 93.00 ± 0% ~ (p=1.000 n=10) ¹ geomean 73.42 73.28 -0.18% ¹ all samples are equal Updates golang#62121
62e6b63
to
bb6bb30
Compare
This PR (HEAD: bb6bb30) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/704215. Important tips:
|
Message from kyose chang: Patch Set 4: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/704215. |
To make the code more readable and improve performance:
goos: darwin
goarch: arm64
pkg: encoding/xml
cpu: Apple M4
│ old │ new │
│ sec/op │ sec/op vs base │
Marshal-10 1.902µ ± 1% 1.496µ ± 1% -21.37% (p=0.000 n=10)
Unmarshal-10 3.877µ ± 1% 3.418µ ± 2% -11.84% (p=0.000 n=10)
HTMLAutoClose-10 1.314µ ± 3% 1.333µ ± 1% ~ (p=0.270 n=10)
geomean 2.132µ 1.896µ -11.07%
Marshal-10 5.570Ki ± 0% 5.570Ki ± 0% ~ (p=1.000 n=10) ¹
Unmarshal-10 7.586Ki ± 0% 7.555Ki ± 0% -0.41% (p=0.000 n=10)
HTMLAutoClose-10 3.496Ki ± 0% 3.496Ki ± 0% ~ (p=1.000 n=10) ¹
geomean 5.286Ki 5.279Ki -0.14%
¹ all samples are equal
Marshal-10 23.00 ± 0% 23.00 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal-10 185.0 ± 0% 184.0 ± 0% -0.54% (p=0.000 n=10)
HTMLAutoClose-10 93.00 ± 0% 93.00 ± 0% ~ (p=1.000 n=10) ¹
geomean 73.42 73.28 -0.18%
¹ all samples are equal
Updates #62121