[llvm-commits] [poolalloc] r99057 - /poolalloc/trunk/include/dsa/svset.h
Andrew Lenharth
andrewl at lenharth.org
Sat Mar 20 08:19:34 PDT 2010
Author: alenhar2
Date: Sat Mar 20 10:19:34 2010
New Revision: 99057
URL: http://llvm.org/viewvc/llvm-project?rev=99057&view=rev
Log:
specialize insert for other sets. MUCH FASTER
Modified:
poolalloc/trunk/include/dsa/svset.h
Modified: poolalloc/trunk/include/dsa/svset.h
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/include/dsa/svset.h?rev=99057&r1=99056&r2=99057&view=diff
==============================================================================
--- poolalloc/trunk/include/dsa/svset.h (original)
+++ poolalloc/trunk/include/dsa/svset.h Sat Mar 20 10:19:34 2010
@@ -147,6 +147,15 @@
sort_unique();
}
+ //specialized insert for another svset
+ void insert(const_iterator ii, const_iterator ie ) {
+ internal_type ctemp;
+ ctemp.reserve(container_.size());
+ std::set_union(ii, ie, container_.begin(), container_.end(),
+ std::back_inserter(ctemp));
+ container_.swap(ctemp);
+ }
+
void erase ( iterator position ) {
container_.erase(position);
}
More information about the llvm-commits
mailing list