On May 21, 2014, at 9:19 , Manuel Klimek <[email protected]> wrote: > On Wed, May 21, 2014 at 6:10 PM, Jordan Rose <[email protected]> wrote: > You might want to bump up the size of the SmallVector too. Right now you're > dynamically allocating a SmallVector<T, 1>, and immediately putting two > things into it. Alternately, you could use a std::vector, which has a smaller > sizeof itself. > > I tried the various combinations, and it didn't make a difference, so I went > for making the code the simplest, which was reusing the ParentVector typedef. > If we change the ParentVector to a SmallVector<T, 2> we'll also use that for > getParents() which mostly returns a single element. >
SmallVector's already too big to fit in registers, so adding another two words to it won't really hurt any uses on the stack, will it? Alternately you could wrap up your PointerUnion in something similar to TinyPtrVector, but that's probably more complexity than is really necessary here. Jordan
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
