Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: combine slice header and backing array for static slices into a single symbol #7637
Static slices generate two symbols, one for the slice header and one for the backing array. These could be combined into a single symbol, laid out with the slice header followed by the backing array. This would reduce binary size, particularly for the unicode tables. This does not make sense to do unless issue #7599 is also done, otherwise the backing array will be needlessly loaded during init. See https://golang.org/cl/78870047/ for more discussion. Something similar could probably profitably be done for strings and string headers, although there is a different approach under discussion at issue #7384.