Hi Dmitri, 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.
It is not necessarily a "free" change as the storage is no longer contiguous, on the other hand, it means avoiding all reallocations. -- Matthieu On Wed, Jun 13, 2012 at 3:34 AM, Dmitri Gribenko <[email protected]>wrote: > On Mon, Jun 11, 2012 at 8:39 AM, Douglas Gregor <[email protected]> wrote: > > Please use FileCheck rather than grep. > > Done. > > > > Might SmallString<256> be a better choice here than std::string, since > many comments are likely to be short? > > Does not apply to latest version of the patch where a single > SourceRange is tracked for a merged comment in order to be able > associate source locations with tokens inside comments. > > > 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? > > Implemented caching negative results, but in a different way. > > Dmitri > > -- > main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if > (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/ > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
