Skip to content

cmd/compile: sparseMaps and sparseSets could shrink size of "sparse" arrays #15718

@dr2chase

Description

@dr2chase

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions