Skip to content

add a small vector to the standard library #4991

Closed
@thestinger

Description

@thestinger

It's often useful to have a vector optimized for storing small sequences. LLVM includes a SmallVector templated type which takes the size to store inside the struct as a template parameter, which isn't possible at the moment in Rust. However, it would be fine to just copy what libc++ does for std::string which is to store 3 words in the struct (size, capacity, and the pointer) and reuse that space for the small string optimization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.I-slowIssue: Problems and improvements with respect to performance of generated code.P-lowLow priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions