Skip to content

pre-allocate for Set() new component for lower memory usage #107

Open
@JoshuaC215

Description

@JoshuaC215

Extra allocations are done when using an empty bytes.Buffer here in createInsertComponents(). bytes.Buffer uses a normal grow strategy of successively doubling in size. This could be avoided by counting the length of the needed keys and the final set value and starting with a Buffer that is about the right size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions