-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Transition to salsa coarse-grained tracked structs #15763
base: main
Are you sure you want to change the base?
Conversation
@@ -18,7 +18,7 @@ use super::path::{ModulePath, SearchPath, SearchPathValidationError}; | |||
|
|||
/// Resolves a module name to a module. | |||
pub fn resolve_module(db: &dyn Db, module_name: &ModuleName) -> Option<Module> { | |||
let interned_name = ModuleNameIngredient::new(db, module_name); | |||
let interned_name = ModuleNameIngredient::new(db, module_name.clone()); |
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 change was caused by the new bounds introduced in salsa-rs/salsa@f428a94. I'm not sure why there's no blanket implementation for &T
anymore.
6a70801
to
184a795
Compare
CodSpeed Performance ReportMerging #15763 will improve performances by 15.64%Comparing Summary
Benchmarks breakdown
|
184a795
to
e6badd1
Compare
|
Summary
Transition to using coarse-grained tracked structs (depends on salsa-rs/salsa#657). For now, this PR doesn't add any
#[tracked]
fields, meaning that any changes cause the entire struct to be invalidated. It also changesAstNodeRef
to be compared/hashed by pointer address, instead of performing a deep AST comparison.Test Plan
This yields a 10-15% improvement on my machine (though weirdly some runs were 5-10% without being flagged as inconsistent by criterion, is there some non-determinism involved?). It's possible that some of this is unrelated, I'll try applying the patch to the current salsa version to make sure.