Navigation Menu

Skip to content
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

go/types: don't build errors in AssignableTo, ConvertibleTo #54172

Closed
findleyr opened this issue Aug 1, 2022 · 1 comment
Closed

go/types: don't build errors in AssignableTo, ConvertibleTo #54172

findleyr opened this issue Aug 1, 2022 · 1 comment
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Performance
Milestone

Comments

@findleyr
Copy link
Contributor

findleyr commented Aug 1, 2022

Discovered while investigating gopls completion performance (#53992).

While doing auto-completion in gopls, around 25% of total CPU time is spent building strings in Checker.implements here, via calls to types.AssignableTo and types.ConvertibleTo. These error strings aren't used in that codepath.

It would be trivial to avoid building error strings that won't be used, following a similar pattern used elsewhere in the type checker (a reason *string argument).

CC @griesemer @adonovan

@gopherbot
Copy link

Change https://go.dev/cl/423360 mentions this issue: go/types: don't build unnecessary error strings in Checker.implements

@golang golang locked and limited conversation to collaborators Aug 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Performance
Projects
None yet
Development

No branches or pull requests

3 participants