-
Notifications
You must be signed in to change notification settings - Fork 13.3k
syntax: convert ast_map to use a SmallIntMap. #11616
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
Conversation
This seems to reduce memory use by about 1-2% for libstd etc (compiling without optimisations; it doesn't appear to make a difference for librustc). @cmr do you have the bench-individual-PRs code still set up? |
Yes but it's going to be a few more hours until I can get to it. On Fri, Jan 17, 2014 at 8:22 AM, Huon Wilson notifications@github.comwrote:
|
(cx.fold_crate(c), cx.map) | ||
let crate = cx.fold_crate(c); | ||
|
||
if log_enabled!(4) { // debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use std::logging::DEBUG
instead of hardcoding 4
Nice find! |
NodeIds are sequential integers starting at zero, so we can achieve some memory savings by just storing the items all in a line in a vector. The occupancy for typical crates seems to be 75-80%, so we're already more efficient than a HashMap (maximum occupancy 75%), not even counting the extra book-keeping that HashMap does.
NodeIds are sequential integers starting at zero, so we can achieve some memory savings by just storing the items all in a line in a vector. The occupancy for typical crates seems to be 75-80%, so we're already more efficient than a HashMap (maximum occupancy 75%), not even counting the extra book-keeping that HashMap does.
NodeIds are sequential integers starting at zero, so we can achieve some memory savings by just storing the items all in a line in a vector. The occupancy for typical crates seems to be 75-80%, so we're already more efficient than a HashMap (maximum occupancy 75%), not even counting the extra book-keeping that HashMap does.
[`needless_return_with_question_mark`]: don't lint if never type is used for coercion Fixes rust-lang#11616 When we have something like ```rs let _x: String = { return Err(())?; }; ``` we shouldn't suggest removing the `return` because the `!`-ness of `return` is used to coerce the enclosing block to some other type. That will lead to a typeck error without a diverging expression like `return`. changelog: [`needless_return_with_question_mark`]: don't lint if `return`s never typed-ness is used for coercion
NodeIds are sequential integers starting at zero, so we can achieve some
memory savings by just storing the items all in a line in a vector.
The occupancy for typical crates seems to be 75-80%, so we're already
more efficient than a HashMap (maximum occupancy 75%), not even counting
the extra book-keeping that HashMap does.