Skip to content

Consider not using SmallVec #4

Open
@Imberflur

Description

@Imberflur

Because SmallVec has the capability to store elements inline for small lengths it has to make additional checks on whether an allocation or inline storage is being used. This introduces some overhead as evidenced in benchmarks.

In the use cases where I want to reach for a bitvec crate I typically expect to need to represent larger amount of bits than will fit inline in a SmallVec. So the allocation savings may not be significant enough to be worth this additional overhead.

I think it would be useful to consider replacing SmallVec with a plain Vec or making BitVecSimd generic over the backing storage.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions