summaryrefslogtreecommitdiff
path: root/src/theory/sets
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-04-06 09:33:52 -0700
committerGitHub <noreply@github.com>2021-04-06 16:33:52 +0000
commitcfe1431aaae7366dea1d3124742ee2b2c2a2511e (patch)
tree7c30457bef5857947102636bddc8cc3a05e9e3c5 /src/theory/sets
parente92b4504d5930234c852bf0fba8f5663ad4809e7 (diff)
Remove template argument from `NodeBuilder` (#6290)
Currently, NodeBuilder takes a single template argument: An integer that determines the expected number of arguments. This argument is used to determine the size of the d_inlineNvChildSpace array. This array is used to construct nodes inline. The advantage of this is that we don't have to allocate a NodeValue on the heap for the node under construction until we are sure that the node is new. While templating the array size may save some stack space (or avoid a heap allocation if we statically know that we a fixed number of children and that number is greater than 10), it complicates the code and leads to longer compile times. Thus, this commit removes the template argument and moves some of the NodeBuilder code to a source file for faster compilation. CPU build time before change (debug build): 2429.68s CPU build time after change (debug build): 2228.44s Signed-off-by: Andres Noetzli noetzli@amazon.com
Diffstat (limited to 'src/theory/sets')
-rw-r--r--src/theory/sets/theory_sets_private.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp
index bb4080578..b97d3125d 100644
--- a/src/theory/sets/theory_sets_private.cpp
+++ b/src/theory/sets/theory_sets_private.cpp
@@ -1225,7 +1225,7 @@ Node mkAnd(const std::vector<TNode>& conjunctions)
return conjunctions[0];
}
- NodeBuilder<> conjunction(kind::AND);
+ NodeBuilder conjunction(kind::AND);
std::set<TNode>::const_iterator it = all.begin();
std::set<TNode>::const_iterator it_end = all.end();
while (it != it_end)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback