cmd/compile: pack structs containing anonymous fields more tightly #31047
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
I attempted to refactor some common fields (E) out of a struct (T1), yielding (T2). Unfortunately, this changed the packing of the fields, which makes this refactoring infeasible in this case.
Observe the Offset of C in this code: https://play.golang.com/p/ac5CCIWIlZS
On a first pass, I don't see anything in the spec that forbids T1 and T2 being laid out identically in memory.
The text was updated successfully, but these errors were encountered: