[PATCH] D14690: Don't force std::set for SmallSet
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 14:41:04 PST 2015
>> -template <typename T, unsigned N, typename C = std::less<T> >
>> +template <typename T, unsigned N, typename BigSet = DenseSet<T>>
>> class SmallSet {
>> /// Use a SmallVector to hold the elements here (even though it will never
>> /// reach its 'large' stage) to avoid calling the default ctors of elements
>> /// we will never use.
>> SmallVector<T, N> Vector;
>> - std::set<T, C> Set;
>> + BigSet Set;
>
> Does `sizeof(SmallSet<T, 1>)` change with this?
Probably depends on the standard library. With libstdc++ 5.1 and T == int I get
master: 80
patch: 64
Cheers,
Rafael
More information about the llvm-commits
mailing list