Skip to content

m-rinaldi/small_vec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

52bd5bb · Sep 5, 2021

History

11 Commits
Sep 5, 2021
Aug 15, 2021
Aug 15, 2021
Sep 5, 2021
Aug 15, 2021
Aug 28, 2021

Repository files navigation

small_vec

A dynamic array or vector supporting small buffer optimization.

License: MIT Build Status


SmallVec<T, N> is, in essence, just an enum with two variants:

  • LocalBuf: a buffer allocated locally inside the SmallVec itself.
  • RemoteBuf: a Vec<T>, i.e., a remote buffer allocated on the heap.

The capacity of the local buffer is specified at compile time as a constant generic argument to SmallVec thanks to const generics.