biomakespace / OpenPlantToy

Arduino & Python controller code for the open plant toy
0 stars 0 forks source link

Efficiency Improvements in tree_match Function in Controller Code #10

Open snasphysicist opened 5 years ago

snasphysicist commented 5 years ago

Using some break or continue statements, there is a possibility to improve the efficiency of this function, for example by stopping the search for matching connections when one has already been found, or by stopping the comparison entirely if any connection is found which does not have a counterpart in the other tree (because the trees then cannot match).