Skip to content

Conversation

apocelipes
Copy link
Contributor

Use "reflect.TypeAssert" can gain some performance improvements:

goos: darwin
goarch: arm64
pkg: encoding/asn1
cpu: Apple M4
│ old │ new │
│ sec/op │ sec/op vs base │
ObjectIdentifierString-10 51.48n ± 1% 49.72n ± 2% -3.41% (p=0.000 n=10)
Marshal-10 7.549µ ± 0% 7.466µ ± 1% -1.10% (p=0.000 n=10)
Unmarshal-10 1.808µ ± 0% 1.798µ ± 0% -0.58% (p=0.000 n=10)
geomean 889.0n 873.8n -1.70%

                      │     old      │                  new                  │
                      │     B/op     │     B/op      vs base                 │

ObjectIdentifierString-10 32.00 ± 0% 32.00 ± 0% ~ (p=1.000 n=10) ¹
Marshal-10 7.336Ki ± 0% 7.336Ki ± 0% ~ (p=1.000 n=10) ¹
Unmarshal-10 432.0 ± 0% 432.0 ± 0% ~ (p=1.000 n=10) ¹
geomean 470.0 470.0 +0.00%
¹ all samples are equal

                      │    old     │                 new                 │
                      │ allocs/op  │ allocs/op   vs base                 │

ObjectIdentifierString-10 1.000 ± 0% 1.000 ± 0% ~ (p=1.000 n=10) ¹
Marshal-10 271.0 ± 0% 271.0 ± 0% ~ (p=1.000 n=10) ¹
Unmarshal-10 24.00 ± 0% 24.00 ± 0% ~ (p=1.000 n=10) ¹
geomean 18.67 18.67 +0.00%
¹ all samples are equal

Updates #62121

@gopherbot
Copy link
Contributor

This PR (HEAD: dc8a5d1) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/710555.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
@gopherbot
Copy link
Contributor

Message from Carlana Johnson:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from kyose chang:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from kyose chang:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Carlana Johnson:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

Use "reflect.TypeAssert" can gain some performance improvements:

goos: darwin
goarch: arm64
pkg: encoding/asn1
cpu: Apple M4
                          │     old     │                new                 │
                          │   sec/op    │   sec/op     vs base               │
ObjectIdentifierString-10   51.48n ± 1%   49.72n ± 2%  -3.41% (p=0.000 n=10)
Marshal-10                  7.549µ ± 0%   7.466µ ± 1%  -1.10% (p=0.000 n=10)
Unmarshal-10                1.808µ ± 0%   1.798µ ± 0%  -0.58% (p=0.000 n=10)
geomean                     889.0n        873.8n       -1.70%

                          │     old      │                  new                  │
                          │     B/op     │     B/op      vs base                 │
ObjectIdentifierString-10     32.00 ± 0%     32.00 ± 0%       ~ (p=1.000 n=10) ¹
Marshal-10                  7.336Ki ± 0%   7.336Ki ± 0%       ~ (p=1.000 n=10) ¹
Unmarshal-10                  432.0 ± 0%     432.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean                       470.0          470.0       +0.00%
¹ all samples are equal

                          │    old     │                 new                 │
                          │ allocs/op  │ allocs/op   vs base                 │
ObjectIdentifierString-10   1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=10) ¹
Marshal-10                  271.0 ± 0%   271.0 ± 0%       ~ (p=1.000 n=10) ¹
Unmarshal-10                24.00 ± 0%   24.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean                     18.67        18.67       +0.00%
¹ all samples are equal

Updates golang#62121
@gopherbot
Copy link
Contributor

This PR (HEAD: c87aae5) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/710555.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.
@gopherbot
Copy link
Contributor

Message from kyose chang:

Patch Set 2:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 2: Auto-Submit+1 Code-Review+2 Commit-Queue+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-10-20T16:28:36Z","revision":"e99d704b932d654ae70985901ea5d78d596cd2a0"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 2: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 2: -Commit-Queue


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2:

This CL has failed the run. Reason:

Tryjob golang/try/gotip-linux-amd64-race has failed with summary (view all results):


To reproduce, try gomote repro 8700474741629268353.

Additional links for debugging:


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2: LUCI-TryBot-Result-1


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Roland Shoemaker:

Patch Set 2: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 2: Commit-Queue+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 2:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2025-10-20T17:06:50Z","revision":"e99d704b932d654ae70985901ea5d78d596cd2a0"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/710555.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Oct 20, 2025
Use "reflect.TypeAssert" can gain some performance improvements:

goos: darwin
goarch: arm64
pkg: encoding/asn1
cpu: Apple M4
                          │     old     │                new                 │
                          │   sec/op    │   sec/op     vs base               │
ObjectIdentifierString-10   51.48n ± 1%   49.72n ± 2%  -3.41% (p=0.000 n=10)
Marshal-10                  7.549µ ± 0%   7.466µ ± 1%  -1.10% (p=0.000 n=10)
Unmarshal-10                1.808µ ± 0%   1.798µ ± 0%  -0.58% (p=0.000 n=10)
geomean                     889.0n        873.8n       -1.70%

                          │     old      │                  new                  │
                          │     B/op     │     B/op      vs base                 │
ObjectIdentifierString-10     32.00 ± 0%     32.00 ± 0%       ~ (p=1.000 n=10) ¹
Marshal-10                  7.336Ki ± 0%   7.336Ki ± 0%       ~ (p=1.000 n=10) ¹
Unmarshal-10                  432.0 ± 0%     432.0 ± 0%       ~ (p=1.000 n=10) ¹
geomean                       470.0          470.0       +0.00%
¹ all samples are equal

                          │    old     │                 new                 │
                          │ allocs/op  │ allocs/op   vs base                 │
ObjectIdentifierString-10   1.000 ± 0%   1.000 ± 0%       ~ (p=1.000 n=10) ¹
Marshal-10                  271.0 ± 0%   271.0 ± 0%       ~ (p=1.000 n=10) ¹
Unmarshal-10                24.00 ± 0%   24.00 ± 0%       ~ (p=1.000 n=10) ¹
geomean                     18.67        18.67       +0.00%
¹ all samples are equal

Updates #62121

Change-Id: I139b9d0c729c36018d4e00216ab6fc8388f3b51b
GitHub-Last-Rev: c87aae5
GitHub-Pull-Request: #75825
Reviewed-on: https://go-review.googlesource.com/c/go/+/710555
Reviewed-by: Roland Shoemaker <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/710555 has been merged.

@gopherbot gopherbot closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants