Skip to content

protoc-gen-go: use pointer for unknownFields #858

Open
@dsnet

Description

@dsnet

(Background: #856)

XXX_unrecognized is the internal field used to implement unknown fields. The current type is a []byte, which occupies 24B on 64-bit systems. However, the vast majority of situations do not have any unknown fields to store, so this is an increase of 24B that is mostly useless.

Consider changing this to be a pointer instead (perhaps *[]byte), to reduce the footprint to 8B.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions