Comment

Comment by QuadDamaged

`SmallVec` allocates a contiguous array in the struct holding the vector itself (so it can be located on the stack), then if the capacity is insufficent, fallbacks to a heap-allocated `Vec` equivalent.

The `Vec` struct contains the capacity and used length integers, as well as a pointer to the heap-allocated storage.

parent QuadDamaged 7 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton