Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: oversized arrays #14703

Closed
mdempsky opened this issue Mar 8, 2016 · 2 comments
Closed

cmd/compile: oversized arrays #14703

mdempsky opened this issue Mar 8, 2016 · 2 comments

Comments

@mdempsky
Copy link
Member

mdempsky commented Mar 8, 2016

@davecheney noted in https://go-review.googlesource.com/#/c/20350/ that cmd/compile's binary size shrunk by about 400kB as a result of the CL. Investigating, it looks like this is mostly attributable to cmd/compile/internal/ppc64.varianttable:

$ nm -S compile.old | grep varianttable
0000000000d7bc40 00000000000826c0 D cmd/compile/internal/ppc64.varianttable
$ nm -S compile.new | grep varianttable
0000000000beca20 00000000000209b0 D cmd/compile/internal/ppc64.varianttable

Also, I note that table is sized for ppc64.ALAST, whereas it only needs to be sized for ppc64.ALAST & obj.AMask. Also, all of the progtables, and cmd/internal/obj/arm64's oprange table.

So all of those tables have a bunch of empty/unused space in them.

arm64's oprange is probably most worth fixing, because it actually contains pointers, so even if it's unused, the GC needs to scan it. (I think?)

The others waste disk space, but are pointer-free, so they shouldn't need to be paged in. Also, they're all zero values, so they should compress well in the binary distributions. (Still, probably worth fixing if someone wanted some easy low hanging fruit to look into.)

@bradfitz
Copy link
Contributor

bradfitz commented Mar 8, 2016

On it.

@bradfitz bradfitz self-assigned this Mar 8, 2016
@gopherbot
Copy link

CL https://golang.org/cl/20450 mentions this issue.

@golang golang locked and limited conversation to collaborators Mar 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants