Make `ModuleId` a tracked struct
This is in part an experiment. ~~I am partially hoping for this to have a positive memory impact (as it shrinks ModuleId from 12 to 4 bytes)~~ it did not sadge. Funnily enough I also revealed 2 bugs with this (and fixed them).
What's the second bug?
So this does increase memory usage by ~30mb 😕 I am not entirely sure why though I guess we have a lot of block def map queries, and us recording tracked structs in those now makes their memo's allocate the extra slot which is what is observable here? IO would've expected the ModuleId shrinking to balance that out at least. It might be better with the new salsa.
So this does increase memory usage by ~30mb 😕 I am not entirely sure why though I guess we have a lot of block def map queries, and us recording tracked structs in those now makes their memo's allocate the extra slot which is what is observable here? IO would've expected the
ModuleIdshrinking to balance that out at least. It might be better with the new salsa.
Could working on #16368 mitigate this memory usage regression?
Likely? Though that might also be orthogonal to this. Block def maps do have a lot of overhear iirespective of the changes here I'd say.