runtime,cmd/compile,cmd/link: store small GC info as scalars #48740
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Jotting down an idea I had while working on other things.
Lots of GC data is really short. Yet it is stored as FUNCDATA, which means that the data must go in a separate symbol, with all the overhead that such indirection entails (bits to point to the data, cache misses fetching the data, toolchain work processing the data). We have a way to store scalar data (PCDATA). We could use a PCDATA entry associated with the entry PC of a function to store GC info when that GC info is short. The runtime would check the relevant PCDATA entry first and then fall back to the FUNCDATA as needed.
I don't have a good instinct about whether this would end up being better, but it seems like it might be.
The text was updated successfully, but these errors were encountered: