You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: Reduce memory usage by deduplicating type information (#803)
* Reduce memory usage by deduplicating type information
We were storing the type information, 3 words wide, for each memo in each slot, while it is always constant wrt. the ingredient (different slots of the same ingredients will always have the same memos in the same order). This introduces some more unsafety, and the result wasn't as fast so I also had to use some lock-free structures, but the result is worth it: this shaves off 230mb from rust-analyzer with new Salsa.
* Simplify
* Replace `RwLock` with boxcar + `AtomicPtr`
* Use TypeId and allocate instead
* Use `OnceLock` instead of atomic-ptr
---------
Co-authored-by: Chayim Refael Friedman <[email protected]>
0 commit comments