On Tue, Feb 28, 2012 at 7:16 PM, Eli Friedman <[email protected]> wrote: > On Tue, Feb 28, 2012 at 7:04 PM, Daniel Dunbar <[email protected]> wrote: >> Author: ddunbar >> Date: Tue Feb 28 21:04:05 2012 >> New Revision: 151698 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=151698&view=rev >> Log: >> Sema/ObjC: Override search can generate a large search list, bump the base >> size >> of the SmallPtrSet way up to avoid commonly reallocating the buffer size. >> - I didn't see a good argument against it, so I bumped the limit to cover >> the >> max size we see during parsing Cocoa.h. > > It's worth noting that if a SmallPtrSet is large enough, it starts to > slow down lookups, since the "small" isn't a proper hashtable. I'm > not sure where exactly the point is that lookups start becoming slower > than a DenseMap lookup, though.
Interesting, TBH I haven't read the SmallPtrSet implementation. However, I did time the results of my change on PCHifiying Cocoa and showed a small (although very close to noise level) improvement. - Daniel > > -Eli _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
