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

optimize out IRCMessage.Params allocation in the common case #32

Open
slingamn opened this issue Feb 17, 2021 · 0 comments
Open

optimize out IRCMessage.Params allocation in the common case #32

slingamn opened this issue Feb 17, 2021 · 0 comments

Comments

@slingamn
Copy link
Member

See this issue: golang/go#7921

Right now, when a struct contains a reference to one of its own members, it always escapes to the heap. If this issue were fixed, we could add, e.g., [2]internalParams to the IRCMessage struct, and then make Params point to the internal array in the case where there are 2 or fewer params.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant