[cfe-commits] r151698 - /cfe/trunk/lib/Sema/SemaDeclObjC.cpp
Daniel Dunbar
daniel at zuster.org
Tue Feb 28 20:45:59 PST 2012
On Tue, Feb 28, 2012 at 7:16 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Tue, Feb 28, 2012 at 7:04 PM, Daniel Dunbar <daniel at zuster.org> 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
More information about the cfe-commits
mailing list