Skip to content

Commit 6dda1d7

Browse files
committed
Insufficient gain for more complicated code
1 parent cc36155 commit 6dda1d7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/flitter/language/tree.pyx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -554,12 +554,7 @@ cdef class BinaryOperation(Expression):
554554
def __init__(self, Expression left, Expression right):
555555
self.left = left
556556
self.right = right
557-
if not self.left.unbound_names:
558-
self.unbound_names = self.right.unbound_names
559-
elif not self.right.unbound_names:
560-
self.unbound_names = self.left.unbound_names
561-
else:
562-
self.unbound_names = self.left.unbound_names.union(self.right.unbound_names)
557+
self.unbound_names = self.left.unbound_names.union(self.right.unbound_names)
563558

564559
cdef void _compile(self, Program program, list lnames):
565560
self.left._compile(program, lnames)
@@ -595,12 +590,7 @@ cdef class BinaryOperation(Expression):
595590
cdef BinaryOperation binary = <BinaryOperation>T.__new__(T)
596591
binary.left = left
597592
binary.right = right
598-
if not left.unbound_names:
599-
binary.unbound_names = right.unbound_names
600-
elif not right.unbound_names:
601-
binary.unbound_names = left.unbound_names
602-
else:
603-
binary.unbound_names = left.unbound_names.union(right.unbound_names)
593+
binary.unbound_names = left.unbound_names.union(right.unbound_names)
604594
return binary
605595

606596
cdef Vector op(self, Vector left, Vector right):

0 commit comments

Comments
 (0)