Index: src/CodeTools/DeclStats.cc
===================================================================
--- src/CodeTools/DeclStats.cc	(revision d3a804f57d21e3f65ff496823025b730cc6b84fb)
+++ src/CodeTools/DeclStats.cc	(revision 97d246da445a8795c4b899478cd650136325c2ef)
@@ -282,5 +282,7 @@
 			printAllSparseHisto("overloads", [](const Stats& stats) { return stats.by_name; });
 			printAll("basic_type_names", [](const Stats& stats) { return stats.basic_type_names.size(); });
+			printAllSparseHisto("basic_type_uses", [](const Stats& stats) { return stats.basic_type_names; });
 			printAll("compound_type_names", [](const Stats& stats) { return stats.compound_type_names.size(); });
+			printAllSparseHisto("compound_type_uses", [](const Stats& stats) { return stats.compound_type_names; });
 			printAllPack("params", [](const Stats& stats) { return stats.params; });
 			printAllPack("returns", [](const Stats& stats) { return stats.returns; });
Index: src/Common/VectorMap.h
===================================================================
--- src/Common/VectorMap.h	(revision d3a804f57d21e3f65ff496823025b730cc6b84fb)
+++ src/Common/VectorMap.h	(revision 97d246da445a8795c4b899478cd650136325c2ef)
@@ -38,9 +38,9 @@
 	typedef const const_value_type* const_pointer;
 	
-	class iterator : public std::iterator< std::bidirectional_iterator_tag,
+	class iterator : public std::iterator< std::random_access_iterator_tag,
 	                                       value_type,
-										    difference_type,
-											pointer,
-											reference > {
+										   difference_type,
+										   pointer,
+										   reference > {
 	friend class VectorMap;
 	friend class const_iterator;
@@ -74,8 +74,40 @@
 		iterator operator-- (int) { iterator tmp = *this; --(*this); return tmp; }
 
+		iterator& operator+= (difference_type i) {
+			// SHENANIGANS: same reasons as operator++
+			new(&data) value_type{ (data.first + i), *(&data.second + i) };
+			return *this;
+		}
+
+		iterator operator+ (difference_type i) const { iterator tmp = *this; return tmp += i; }
+
+		iterator& operator-= (difference_type i) {
+			// SHENANIGANS: same reasons as operator++
+			new(&data) value_type{ (data.first - i), *(&data.second - i) };
+			return *this;
+		}
+
+		iterator operator- (difference_type i) const { iterator tmp = *this; return tmp -= i; }
+
+		difference_type operator- (const iterator& o) const { return data.first - o.data.first; }
+
+		value_type operator[] (difference_type i) const {
+			// SHENANIGANS: same reasons as operator++
+			return value_type{ (data.first + i), *(&data.second + i) };
+		}
+
 		bool operator== (const iterator& o) const {
 			return data.first == o.data.first && &data.second == &o.data.second;
 		}
+		
 		bool operator!= (const iterator& that) const { return !(*this == that); }
+
+		bool operator< (const iterator& o) const { return data.first < o.data.first; }
+
+		bool operator> (const iterator& o) const { return data.first > o.data.first; }
+
+		bool operator<= (const iterator& o) const { return data.first <= o.data.first; }
+
+		bool operator>= (const iterator& o) const { return data.first >= o.data.first; }
 	};
 
@@ -118,8 +150,46 @@
 		const_iterator operator-- (int) { const_iterator tmp = *this; --(*this); return tmp; }
 
+		const_iterator& operator+= (difference_type i) {
+			// SHENANIGANS: same reasons as iterator::operator++
+			new(&data) const_value_type{ (data.first + i), *(&data.second + i) };
+			return *this;
+		}
+
+		const_iterator operator+ (difference_type i) const {
+			const_iterator tmp = *this; return tmp += i;
+		}
+
+		const_iterator& operator-= (difference_type i) {
+			// SHENANIGANS: same reasons as iterator::operator++
+			new(&data) const_value_type{ (data.first - i), *(&data.second - i) };
+			return *this;
+		}
+
+		const_iterator operator- (difference_type i) const {
+			const_iterator tmp = *this; return tmp -= i;
+		}
+
+		difference_type operator- (const const_iterator& o) const {
+			return data.first - o.data.first;
+		}
+
+		const_value_type operator[] (difference_type i) const {
+			// SHENANIGANS: same reasons as iterator::operator++
+			return const_value_type{ (data.first + i), *(&data.second + i) };
+		}
+
 		bool operator== (const const_iterator& o) const {
 			return data.first == o.data.first && &data.second == &o.data.second;
 		}
+		
 		bool operator!= (const const_iterator& that) const { return !(*this == that); }
+
+		bool operator< (const const_iterator& o) const { return data.first < o.data.first; }
+
+		bool operator> (const const_iterator& o) const { return data.first > o.data.first; }
+
+		bool operator<= (const const_iterator& o) const { return data.first <= o.data.first; }
+
+		bool operator>= (const const_iterator& o) const { return data.first >= o.data.first; }
 	};
 
@@ -163,4 +233,16 @@
 };
 
+template<typename T>
+typename VectorMap<T>::iterator operator+ (typename VectorMap<T>::difference_type i, 
+                                           const typename VectorMap<T>::iterator& it) {
+	return it + i;
+}
+
+template<typename T>
+typename VectorMap<T>::const_iterator operator+ (typename VectorMap<T>::difference_type i, 
+                                                 const typename VectorMap<T>::const_iterator& it) {
+	return it + i;
+}
+
 #endif // _VECTORMAP_H
 
