summaryrefslogtreecommitdiff
path: root/makefile.patch
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2017-09-21 19:07:47 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2017-09-21 20:21:00 +0200
commit2de42031515a88d9847889e2d742b7066e33c26e (patch)
tree6a008c7b98f200d6102bcebc063495efdefefd79 /makefile.patch
parent7b475ced7e38b0649e04940051a6438cbe4affd3 (diff)
Simplify expression representation
Store simple (<operator>, <operand 1>, <operand 2>) tuples instead of (<operator>, [list of operands]) tuples. The thought process behind the original representation was to avoid creating lots of nodes for long X && Y && Z && ... chains that sometimes appear, and possibly speed up evaluation. In retrospect, it's pretty bad, for the following reasons: 1) _make_and() and _make_or() created lots of new merged lists instead of simply reusing the tuples already allocated for the subexpressions. This is slow and memory hungry. 2) Any gain in evaluating long expressions would barely offset slower evaluation of short expressions. 3) The code became more complex. Most importantly, this change makes expressions more straightforward to work with for people peeking into internals.
Diffstat (limited to 'makefile.patch')
0 files changed, 0 insertions, 0 deletions