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: statically initialize some interface values #15528

Closed
josharian opened this issue May 3, 2016 · 4 comments
Closed

cmd/compile: statically initialize some interface values #15528

josharian opened this issue May 3, 2016 · 4 comments

Comments

@josharian
Copy link
Contributor

The code in #15520 generates a giant init function, aimed at setting up an array of interface values. The components are, however, entirely static: Static itab and static data. We should thus be able to create the entire array statically instead of making an init function.

cc @walken-google @randall77 @crawshaw

@josharian josharian added this to the Go1.8 milestone May 3, 2016
@randall77
Copy link
Contributor

Yes, please. The more we can do at link time the better.

@josharian
Copy link
Contributor Author

image/color/palette appears to be a good test case for this in the stdlib.

josharian added a commit to josharian/go that referenced this issue May 13, 2016
When possible, emit static data rather than
init functions for interface values.

This:

* cuts 32k off cmd/go
* removes several error values from runtime init
* cuts the size of thenimage/color/palette compiled package from 103k to 34k
* reduces the time to build the package in golang#15520 from 8s to 1.5s

Fixes golang#15528

Change-Id: I317112da17aadb180c958ea328ab380f83e640b4
@josharian josharian self-assigned this May 13, 2016
@josharian
Copy link
Contributor Author

CL prepared for 1.8. Unstable url for those who want to peek.

josharian added a commit to josharian/go that referenced this issue May 17, 2016
When possible, emit static data rather than
init functions for interface values.

This:

* cuts 32k off cmd/go
* removes several error values from runtime init
* cuts the size of thenimage/color/palette compiled package from 103k to 34k
* reduces the time to build the package in golang#15520 from 8s to 1.5s

Fixes golang#15528

Change-Id: I317112da17aadb180c958ea328ab380f83e640b4
josharian added a commit to josharian/go that referenced this issue May 27, 2016
When possible, emit static data rather than
init functions for interface values.

This:

* cuts 32k off cmd/go
* removes several error values from runtime init
* cuts the size of thenimage/color/palette compiled package from 103k to 34k
* reduces the time to build the package in golang#15520 from 8s to 1.5s

Fixes golang#6289
Fixes golang#15528

Change-Id: I317112da17aadb180c958ea328ab380f83e640b4
josharian added a commit to josharian/go that referenced this issue Jun 19, 2016
When possible, emit static data rather than
init functions for interface values.

This:

* cuts 32k off cmd/go
* removes several error values from runtime init
* cuts the size of the image/color/palette compiled package from 103k to 34k
* reduces the time to build the package in golang#15520 from 8s to 1.5s

Fixes golang#6289
Fixes golang#15528

Change-Id: I317112da17aadb180c958ea328ab380f83e640b4
josharian added a commit to josharian/go that referenced this issue Jun 24, 2016
When possible, emit static data rather than
init functions for interface values.

This:

* cuts 32k off cmd/go
* removes several error values from runtime init
* cuts the size of the image/color/palette compiled package from 103k to 34k
* reduces the time to build the package in golang#15520 from 8s to 1.5s

Fixes golang#6289
Fixes golang#15528

Change-Id: I317112da17aadb180c958ea328ab380f83e640b4
@gopherbot
Copy link

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

josharian added a commit to josharian/go that referenced this issue Aug 31, 2016
When possible, emit static data rather than
init functions for interface values.

This:

* cuts 32k off cmd/go
* removes several error values from runtime init
* cuts the size of the image/color/palette compiled package from 103k to 34k
* reduces the time to build the package in golang#15520 from 8s to 1.5s

Fixes golang#6289
Fixes golang#15528

Change-Id: I317112da17aadb180c958ea328ab380f83e640b4
@golang golang locked and limited conversation to collaborators Sep 12, 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