File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler/rustc_expand/src/mbe Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,14 @@ struct MatcherTtFrame<'tt> {
101101 idx : usize ,
102102}
103103
104- type NamedMatchVec = SmallVec < [ NamedMatch ; 4 ] > ;
104+ // One element is enough to cover 95-99% of vectors for most benchmarks. Also,
105+ // vectors longer than one frequently have many elements, not just two or
106+ // three.
107+ type NamedMatchVec = SmallVec < [ NamedMatch ; 1 ] > ;
105108
106109// This type is used a lot. Make sure it doesn't unintentionally get bigger.
107110#[ cfg( all( target_arch = "x86_64" , target_pointer_width = "64" ) ) ]
108- rustc_data_structures:: static_assert_size!( NamedMatchVec , 168 ) ;
111+ rustc_data_structures:: static_assert_size!( NamedMatchVec , 48 ) ;
109112
110113/// Represents a single "position" (aka "matcher position", aka "item"), as
111114/// described in the module documentation.
You can’t perform that action at this time.
0 commit comments