-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
incr.comp.: Use a struct-of-arrays instead of an array-of-structs for SerializedDepGraph #47326
Comments
Some more information: The thing that could be refactored here is the rust/src/librustc/dep_graph/serialized.rs Line 23 in 24e679c
At the moment it is an array of Then the following step in rust/src/librustc/dep_graph/graph.rs Lines 479 to 482 in 24e679c
One could even try to not copy the arrays at all in |
I can take this. Thanks for writing up that additional detail @michaelwoerister! |
Cool! Thanks, @wesleywiser! |
…ister Convert SerializedDepGraph to be a struct-of-arrays Fixes rust-lang#47326 I did not try the "`mem::swap()` to avoid copying the arrays" idea because that would leave the DepGraph in an incorrect state and that doesn't seem like a good idea for me. r? @michaelwoerister
…ister Convert SerializedDepGraph to be a struct-of-arrays Fixes rust-lang#47326 I did not try the "`mem::swap()` to avoid copying the arrays" idea because that would leave the DepGraph in an incorrect state and that doesn't seem like a good idea for me. r? @michaelwoerister
This should improve memory consumption and cache locality a bit because we are wasting space on padding bytes at the moment. It should also enable us to bulk-persist parts or all of the graph to disk at once instead of dealing with each value separately.
The text was updated successfully, but these errors were encountered: