Expand description
RowVec - Cached row vector for zero-allocation table scans
This type wraps Vec<(i64, Row)> and returns it to a thread-local pool on drop. Uses a capacity-aware pool with best-fit allocation for efficient buffer reuse.
Pool Design:
- Sorted by capacity (ascending) for O(log n) best-fit search
- 16 slots to handle concurrent usage patterns
- Best-fit allocation: returns smallest buffer >= requested capacity
- Smart eviction: keeps larger buffers which are more versatile
Structs§
- RowId
Vec - Cached row ID vector that returns to thread-local cache on drop.
- RowId
VecInto Iter - Owning iterator for RowIdVec.
- RowVec
- Cached row vector that returns to thread-local cache on drop.
- RowVec
Iter - Draining iterator that preserves allocation for cache reuse. Uses ptr::read for zero-allocation iteration - no dummy rows created.
Functions§
- clear_
row_ id_ vec_ pool - Clear the thread-local RowIdVec pool, releasing all cached buffers. Call this when dropping a database to prevent memory retention.
- clear_
row_ vec_ pool - Clear the thread-local RowVec pool, releasing all cached buffers. Call this when dropping a database to prevent memory retention.