pub struct DynamicJetArena { /* private fields */ }Expand description
Reusable storage for runtime-sized packed jets. Scalar primitives write
into this bump arena, so arithmetic performs no heap allocation. Callers
reserve once per worker/chunk and reset between rows.
Implementations§
Source§impl DynamicJetArena
impl DynamicJetArena
Sourcepub fn with_capacity(bytes: usize) -> Self
pub fn with_capacity(bytes: usize) -> Self
Create an arena with a row-program-selected initial byte capacity.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Reclaim all scalar outputs and compact a fragmented high-water mark into one retained chunk.
bumpalo::Bump::reset keeps only its newest chunk and returns every
older chunk to the global allocator. Runtime jet tapes routinely span
several geometrically-grown chunks, so a bare reset would allocate
those discarded chunks again on every row. When reset exposes that
fragmentation, replace the empty arena once with a single chunk large
enough for the complete prior tape. Later equal-or-smaller rows reuse
that chunk without allocator traffic.
Sourcepub fn allocated_bytes(&self) -> usize
pub fn allocated_bytes(&self) -> usize
Bytes currently reserved from the global allocator. A warm-reset-warm benchmark uses this to prove the second row requires no arena growth.
Trait Implementations§
Source§impl Debug for DynamicJetArena
impl Debug for DynamicJetArena
Auto Trait Implementations§
impl !Freeze for DynamicJetArena
impl !RefUnwindSafe for DynamicJetArena
impl !Sync for DynamicJetArena
impl !UnwindSafe for DynamicJetArena
impl Send for DynamicJetArena
impl Unpin for DynamicJetArena
impl UnsafeUnpin for DynamicJetArena
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.