Use StaticVec for function resolution caches for the common case where no modules are used.

This commit is contained in:
Stephen Chung
2021-09-12 13:33:55 +08:00
parent 6e25354076
commit 96dbbc76e4
2 changed files with 8 additions and 8 deletions

View File

@@ -271,7 +271,7 @@ pub use module::NamespaceRef;
///
/// The number 3, other than being the holy number, is carefully chosen for a balance between
/// storage space and reduce allocations. That is because most function calls (and most functions,
/// in that matter) contain fewer than 4 arguments, the exception being closures that capture a
/// for that matter) contain fewer than 4 arguments, the exception being closures that capture a
/// large number of external variables.
///
/// In addition, most script blocks either contain many statements, or just one or two lines;
@@ -306,7 +306,7 @@ type StaticVec<T> = smallvec::SmallVec<[T; 3]>;
///
/// The number 3, other than being the holy number, is carefully chosen for a balance between
/// storage space and reduce allocations. That is because most function calls (and most functions,
/// in that matter) contain fewer than 4 arguments, the exception being closures that capture a
/// for that matter) contain fewer than 4 arguments, the exception being closures that capture a
/// large number of external variables.
///
/// In addition, most script blocks either contain many statements, or just one or two lines;