Hi Dmitri,<br><br>Since you say that most time is spent during `vector::push_back` I was wondering if using a `deque` instead would help alleviate this cost.<br><br>It is not necessarily a "free" change as the storage is no longer contiguous, on the other hand, it means avoiding all reallocations.<br>
<br>-- Matthieu<br><br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 3:34 AM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Jun 11, 2012 at 8:39 AM, Douglas Gregor <<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>> wrote:<br>
> Please use FileCheck rather than grep.<br>
<br>
Done.<br>
<br>
<br>
> Might SmallString<256> be a better choice here than std::string, since many comments are likely to be short?<br>
<br>
Does not apply to latest version of the patch where a single<br>
SourceRange is tracked for a merged comment in order to be able<br>
associate source locations with tokens inside comments.<br>
<br>
> Should we insert an empty string into DeclComments early on, before we do the work of performing lower_bound, so that repeated queries for the comment string of a declaration that does *not* have a comment don't keep performing lower_bound calls? In other words, should we cache the negative case as well as the positive case?<br>

<br>
Implemented caching negative results, but in a different way.<br>
<div class="HOEnZb"><div class="h5"><br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div><br>