-// Cint currently doesn't like vector<..,default_alloc> but malloc_alloc is
-// unstandardized and not supported by newer GCCs. This ugly hack will go
-// away soon!
-#if (defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ < 97)) || (defined(G__GNUC) && (G__GNUC == 2) && (G__GNUC_MINOR < 97))
- typedef std::vector<GiNaC::ex,malloc_alloc> exvector;
-#else
- typedef std::vector<ex> exvector;
+typedef std::vector<ex> exvector;
+typedef std::set<ex, ex_is_less> exset;
+typedef std::map<ex, ex, ex_is_less> exmap;
+
+// Define this to enable some statistical output for comparisons and hashing
+#undef GINAC_COMPARE_STATISTICS
+
+#ifdef GINAC_COMPARE_STATISTICS
+class compare_statistics_t {
+public:
+ compare_statistics_t()
+ : total_compares(0), nontrivial_compares(0), total_basic_compares(0), compare_same_hashvalue(0), compare_same_type(0),
+ total_is_equals(0), nontrivial_is_equals(0), total_basic_is_equals(0), is_equal_same_hashvalue(0), is_equal_same_type(0),
+ total_gethash(0), gethash_cached(0) {}
+ ~compare_statistics_t();
+
+ unsigned long total_compares;
+ unsigned long nontrivial_compares;
+ unsigned long total_basic_compares;
+ unsigned long compare_same_hashvalue;
+ unsigned long compare_same_type;
+
+ unsigned long total_is_equals;
+ unsigned long nontrivial_is_equals;
+ unsigned long total_basic_is_equals;
+ unsigned long is_equal_same_hashvalue;
+ unsigned long is_equal_same_type;
+
+ unsigned long total_gethash;
+ unsigned long gethash_cached;
+};
+
+extern compare_statistics_t compare_statistics;