summaryrefslogtreecommitdiff
path: root/src/context/cdmap.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-07-04 18:36:22 +0000
committerMorgan Deters <mdeters@gmail.com>2010-07-04 18:36:22 +0000
commit693d70847d0ed753a4f035dd3c88eb32607e2081 (patch)
tree0076edc5a7fe9eaf6605bef8bb6804e6a48e4d85 /src/context/cdmap.h
parent0679a64a1c1017d8ef0e26e40a476f2559e6bba3 (diff)
Considerably simplified the way output streams are used. This commit
should have no impact on production performance and speed up debug performance considerably, while making the code much cleaner. On some benchmarks, debug builds now run _much_ faster. We no longer have to sprinkle our code with things like: if(debugTagIsOn("context")) { Debug("context") << theContext << std::endl; } which we had to do to get around performance problems previously. Now just writing: Debug("context") << theContext << std::endl; does the same in production and debug builds. That is, if "context" debugging is off, theContext isn't converted to a string, nor is it output to a "/dev/null" ostream. I've confirmed this. In production builds, the whole statement inlines to nothing. I've confirmed this too. Also, "Debug" is no longer a #definition, so you can use it directly in production builds where you couldn't previously, e.g. if(Debug.isOn("paranoid:check_tableau")) { checkTableau(); } I'm leaving debugTagIsOn() for now, but marking it as deprecated.
Diffstat (limited to 'src/context/cdmap.h')
-rw-r--r--src/context/cdmap.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h
index b981628c5..45ff68a23 100644
--- a/src/context/cdmap.h
+++ b/src/context/cdmap.h
@@ -106,11 +106,6 @@ namespace context {
template <class Key, class Data, class HashFcn = __gnu_cxx::hash<Key> > class CDMap;
-template <class T, class U>
-inline std::ostream& operator<<(std::ostream& out, const std::pair<T, U>& p) {
- return out << "[" << p.first << "," << p.second << "]";
-}
-
template <class Key, class Data, class HashFcn = __gnu_cxx::hash<Key> >
class CDOmap : public ContextObj {
friend class CDMap<Key, Data, HashFcn>;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback