diff options
author | Andres Noetzli <noetzli@amazon.com> | 2021-04-02 15:43:15 -0700 |
---|---|---|
committer | Andres Noetzli <noetzli@amazon.com> | 2021-04-02 17:59:17 -0700 |
commit | fc6336a011e099bfeff9c9ddd134f7aa6dad47b8 (patch) | |
tree | 43a98b7dd3ad2c942967c019a3a33f9095d27b3e /src/expr/attr_var_name.h | |
parent | fba1437c772b6733ce678b93b5ef7d95e366c82d (diff) |
Remove template argument from `NodeBuilder`an/refactor/NodeBuilder
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
Diffstat (limited to 'src/expr/attr_var_name.h')
0 files changed, 0 insertions, 0 deletions