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: sparseMaps and sparseSets could shrink size of "sparse" arrays #15718

Closed
dr2chase opened this issue May 17, 2016 · 2 comments
Closed

Comments

@dr2chase
Copy link
Contributor

ssa/sparseMap and sparseSet allocate a "sparse" array with length proportional to the size of an ID (used to index Blocks and Values) containing indices of elements in a "dense" array that must necessarily not be larger than the sparse array.

It is therefore sufficient to use an int32 as elements of the sparse array, but currently it is an int, or 64 bits on quite a few Go platforms. We could save space by shrinking these.

@dr2chase dr2chase self-assigned this May 17, 2016
@dr2chase dr2chase added this to the Go1.8Early milestone May 17, 2016
@dr2chase dr2chase changed the title sparseMaps and sparseSets could shrink size of "sparse" arrays cmd/compile: sparseMaps and sparseSets could shrink size of "sparse" arrays May 17, 2016
@josharian
Copy link
Contributor

Looks like this got done. @dr2chase can you confirm and close if so? Thanks.

@dr2chase
Copy link
Contributor Author

dr2chase commented Sep 6, 2016

This got done.
d35a415

@dr2chase dr2chase closed this as completed Sep 6, 2016
@golang golang locked and limited conversation to collaborators Sep 6, 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