<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 21, 2014 at 6:20 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class=""><br><div><div>On May 21, 2014, at 9:19 , Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 21, 2014 at 6:10 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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.<br>

</blockquote><div><br></div><div>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.</div><div>If we change the ParentVector to a SmallVector<T, 2> we'll also use that for getParents() which mostly returns a single element.</div>

<div> </div></div></div></div></blockquote><br></div></div><div>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?</div></div></blockquote>
<div><br></div><div>So you're proposing to just bump it to 2? I'm happy to do that, but I lack any way to get data that would sway me one way or the other, thus I think it's mostly guesswork (but I trust your guesswork is probably better than mine ;)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Alternately you could wrap up your PointerUnion in something similar to TinyPtrVector, but that's probably more complexity than is really necessary here.</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><div>Jordan</div><br></font></span></div>
</blockquote></div><br></div></div>