[llvm-commits] [llvm] r42397 -	/llvm/trunk/lib/Analysis/IPA/Andersens.cpp
    Chris Lattner 
    clattner at apple.com
       
    Thu Sep 27 10:01:33 PDT 2007
    
    
  
On Sep 27, 2007, at 9:20 AM, Daniel Berlin wrote:
>> std::set is inefficient for several reasons, particularly because
>> every insertion does a malloc.  If this is performance critical code
>> you might want to try out SmallSet (assuming the set is small) or
>> some sort of hash table like DenseMap.
>
>
> It's not performance critical, but the sets aren't small.  They can be
> hundreds of thousands.
>
> I was looking for something like DenseSet, but couldn't find it.
>
> Should i just use DenseMap<Constraint, bool> then?
Yes, that's probably best for now.  If you feel ambitious, it would  
be even better to define a DenseSet, which is implemented in terms of  
DenseMap<T, bool> for now.  This lets clients like you use the right  
interface but allows us to tune the impl later.
-Chris
    
    
More information about the llvm-commits
mailing list