summaryrefslogtreecommitdiff
path: root/src/xact.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-14 04:29:53 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-14 04:29:53 -0500
commitd89c60f49cf1eb2df3cc761b9790e6fc47cc7c96 (patch)
treeac53702dbc7050e3d7c7dfb5de4b9a085e80826d /src/xact.h
parente3064b952029a4fe8f7b65442d23e1112f26bb5f (diff)
downloadledger-d89c60f49cf1eb2df3cc761b9790e6fc47cc7c96.tar.gz
ledger-d89c60f49cf1eb2df3cc761b9790e6fc47cc7c96.tar.bz2
ledger-d89c60f49cf1eb2df3cc761b9790e6fc47cc7c96.zip
Memoize results from the fast predicate matcher
This gains another 15% for the parser, again with a very simple change that has no impact if the fast predicate matcher fails to work.
Diffstat (limited to 'src/xact.h')
-rw-r--r--src/xact.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xact.h b/src/xact.h
index 07f9a6c7..c819b2a0 100644
--- a/src/xact.h
+++ b/src/xact.h
@@ -148,6 +148,8 @@ public:
predicate_t predicate;
bool try_quick_match;
+ std::map<string, bool> memoized_results;
+
auto_xact_t() : try_quick_match(true) {
TRACE_CTOR(auto_xact_t, "");
}