cmd/compile: use memmove to initialize non-global static data #29693
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsFix
The path to resolution is known, but the work has not been done.
Performance
Milestone
This is a duplicate of #29573 (comment) and #29574 (comment), but split out so that it doesn't get lost in the other discussions.
When initializing static data in a function (non-global) context, we generate code to construct the desired object. In some (most?) cases, it'd be preferable to have a static data symbol containing the desired object and then copy it into place using memmove/typedmemmove.
See those issues/comments for more details.
cc @dsnet @randall77
The text was updated successfully, but these errors were encountered: