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

Investigate: la_arena::Arena size effect #18403

Open
Veykril opened this issue Oct 24, 2024 · 1 comment
Open

Investigate: la_arena::Arena size effect #18403

Veykril opened this issue Oct 24, 2024 · 1 comment
Labels
A-perf performance issues

Comments

@Veykril
Copy link
Member

Veykril commented Oct 24, 2024

la_arena::Arena is currently a Vec, that is 3 words in size but usually stored in a frozen location. For Vecs we usually turn them into Box<[T]> when stored as those are only 2 words in size, we can't do that with Arena's though as we have no equivalent. It would be interesting to see if we can save a tiny bit of memory if we could. That means, we should check the places where we store Arena's in hot definitions (frequently used defs stored in queries), and also try to apply the vec -> box pattern in more places (a bunch still use Vecs as using this pattern requires splitting out a builder pattern that transform into the Box'd field form when finished)

@Veykril Veykril added the A-perf performance issues label Oct 24, 2024
@ChayimFriedman2
Copy link
Contributor

There's also ArenaMap that is Vec, but it is only in bodies source map and those aren't a big part of our memory usage (around 70mb for analysis-stats . for bodies & source maps).

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

No branches or pull requests

2 participants