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 select actions to avoid heap allocations #12757

Open
straight-shoota opened this issue Nov 18, 2022 · 0 comments
Open

Optimize select actions to avoid heap allocations #12757

straight-shoota opened this issue Nov 18, 2022 · 0 comments

Comments

@straight-shoota
Copy link
Member

straight-shoota commented Nov 18, 2022

I'm also surprised to learn that a select expression creates a class for each of the actions (like SendAction) so memory is allocated on every select. Really bad! I think it should be done in a way that no memory is ever allocated. Like, probably SendAction should be a struct, and we create a static array to hold those values in the stack. Then use pointers to refer to those. I think Go might be doing the same thing.

Originally posted by @asterite in #12694 (comment)

Related: #12756

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

No branches or pull requests

1 participant