cmd/compile: reduce generated algs for compiler created array types #28639
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
There are alot of types algs that seem to be generated due to slicelit initializations:
example from go binary:
There are a few other places were the compiler constructs an array type (e.g. non escaping small slice) where algs are likely not needed.
We should vet the compiler for compiler created types (sinit.go, walk.go) that dont need algs and do a SetNoalg where algs are not needed.
Some overzealous application of SetNoalg on new array types in gc seems to remove the above examples and saves ~45kbyte from the go binary. This might be an upper bound because maybe for some cases we will need them.
I have some other ideas/cls to improve algs (or remove them) for go1.13 so happy to work on this.
@josharian @randall77
The text was updated successfully, but these errors were encountered: