Skip to content

Use SmallVec<[T; 1]> where appropriate #60

Description

@kazimuth

This is a minor perf thing:

SmallVec<[T;N]> is a type that stores can store up to N values inline before spilling to the heap, but otherwise behaves exactly the same as Vec. We should use SmallVec in types that there will be many copies of, for example Unit, to avoid extra heap allocations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions