File tree 1 file changed +5
-2
lines changed
compiler/rustc_expand/src/mbe
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,14 @@ struct MatcherTtFrame<'tt> {
101
101
idx : usize ,
102
102
}
103
103
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 ] > ;
105
108
106
109
// This type is used a lot. Make sure it doesn't unintentionally get bigger.
107
110
#[ 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 ) ;
109
112
110
113
/// Represents a single "position" (aka "matcher position", aka "item"), as
111
114
/// described in the module documentation.
You can’t perform that action at this time.
0 commit comments