pub struct SmallResolver<S, K, V>{ /* private fields */ }Expand description
A fast resolver with a small, fixed-size cache.
This resolver imposes no restrictions on the variable names you can use and is generally faster than the default resolver due to its compact cache and improved cache locality.
§Advantages
- No restrictions on variable or function names.
- The cache is small and compact, reducing memory usage and improving cache locality.
§Disadvantages
- Limited cache size. Not recommended more than 10 items.
§Performance
- Up to 10 variables: Maximum performance is achieved thanks to cache locality.
- 10 to 30 variables: Performance remains good, though cache misses may occur more frequently.
- More than 30 variables: Not recommended; beyond this point, the default resolver is typically faster.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<S, K, V> Freeze for SmallResolver<S, K, V>where
S: Freeze,
impl<S, K, V> RefUnwindSafe for SmallResolver<S, K, V>
impl<S, K, V> Send for SmallResolver<S, K, V>
impl<S, K, V> Sync for SmallResolver<S, K, V>
impl<S, K, V> Unpin for SmallResolver<S, K, V>
impl<S, K, V> UnwindSafe for SmallResolver<S, K, V>
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