sympy/sympy — pull request #2542 by asmeurer (2013-10-20 23:15:03+00:00)
Title: Use _argset in preorder_traversal

This makes atoms much faster on LatticeOps (like And and Or), because it
avoids ever computing the sorted .args, which are internally stored as a
frozenset. This is implemented as the default, because the docstring says
that if keys=False then no order is guaranteed, but if this becomes an issue,
we should perhaps make keys=True the default and set it to False in atoms (the
order never matters in atoms because it returns a set).