Using DONE_SET method to make algorithm faster

What we do is like to maintain a dict {DONE_SET: memory peak}, then Each time when we execute Node X, we make a check if the peak in dict and the current peak bigger than that peak. If yes(or equal), break and start a new branch. if no, update the peak in dict and continue.
I'm pretty sure we should not put =. With the current code, can you put a break point in the else part and see if it get used? putting the =, could make the else not being used. In that case, this revert to the old algo. So it don't speed up anything.