m-rinaldi / small_vec

Vector supporting small buffer optimization

Home Page:https://crates.io/crates/small_vec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

Vector supporting small buffer optimization

https://crates.io/crates/small_vec

License:MIT License


Languages

Language:Rust 100.0%