diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2021-04-06 09:33:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 16:33:52 +0000 |
commit | cfe1431aaae7366dea1d3124742ee2b2c2a2511e (patch) | |
tree | 7c30457bef5857947102636bddc8cc3a05e9e3c5 /src/prop | |
parent | e92b4504d5930234c852bf0fba8f5663ad4809e7 (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/prop')
-rw-r--r-- | src/prop/cnf_stream.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/prop/cnf_stream.cpp b/src/prop/cnf_stream.cpp index 1caea7bb7..10c84f582 100644 --- a/src/prop/cnf_stream.cpp +++ b/src/prop/cnf_stream.cpp @@ -76,7 +76,7 @@ bool CnfStream::assertClause(TNode node, SatClause& c) else { Assert(c.size() > 1); - NodeBuilder<> b(kind::OR); + NodeBuilder b(kind::OR); for (unsigned i = 0; i < c.size(); ++i) { b << getNode(c[i]); |