pub struct PerformanceOptimizer {
pub hints: CapacityHints,
pub string_interner: Option<StringInterner>,
pub lazy_tags: bool,
pub zero_copy: bool,
}Expand description
Performance optimizer combining multiple optimization strategies Performance optimizer that combines multiple optimization strategies
Fields§
§hints: CapacityHintsCapacity hints for allocation
string_interner: Option<StringInterner>String interner for deduplication
Whether to use lazy tag coercion
zero_copy: boolWhether to use zero-copy strings where possible
Implementations§
Source§impl PerformanceOptimizer
impl PerformanceOptimizer
Sourcepub fn aggressive() -> Self
pub fn aggressive() -> Self
Enable all optimizations
Sourcepub fn enable_string_interning(&mut self, capacity: usize)
pub fn enable_string_interning(&mut self, capacity: usize)
Enable string pooling
Enable lazy tag coercion
Sourcepub fn enable_zero_copy(&mut self)
pub fn enable_zero_copy(&mut self)
Enable zero-copy strings
Sourcepub fn alloc_string(&self) -> String
pub fn alloc_string(&self) -> String
Pre-allocate a string with appropriate capacity
Trait Implementations§
Source§impl Debug for PerformanceOptimizer
impl Debug for PerformanceOptimizer
Auto Trait Implementations§
impl !Freeze for PerformanceOptimizer
impl RefUnwindSafe for PerformanceOptimizer
impl Send for PerformanceOptimizer
impl Sync for PerformanceOptimizer
impl Unpin for PerformanceOptimizer
impl UnsafeUnpin for PerformanceOptimizer
impl UnwindSafe for PerformanceOptimizer
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
Mutably borrows from an owned value. Read more