diff --git a/src/ast.rs b/src/ast.rs index 21841502..aa1a1a4a 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -2128,7 +2128,7 @@ mod tests { 96 } ); - assert_eq!(size_of::(), 288); + assert_eq!(size_of::(), 160); assert_eq!(size_of::(), 56); assert_eq!( size_of::(), diff --git a/src/scope.rs b/src/scope.rs index ed0bacd1..3c34cb09 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -7,7 +7,7 @@ use std::prelude::v1::*; use std::{borrow::Cow, iter::Extend}; /// Keep a number of entries inline (since [`Dynamic`] is usually small enough). -const SCOPE_SIZE: usize = 16; +const SCOPE_SIZE: usize = 8; /// Type containing information about the current scope. /// Useful for keeping state between [`Engine`][crate::Engine] evaluation runs. @@ -98,7 +98,7 @@ impl<'a> Scope<'a> { pub fn new() -> Self { Self { values: Default::default(), - names: Vec::with_capacity(SCOPE_SIZE), + names: Default::default(), } } /// Empty the [`Scope`].