I have made a pull request
https://github.com/sympy/sympy/pull/1326 on the canonicalization of tensors with dummy indices;
it is a nice application of the Schreier-Sims algorithm.
It is faster than xperm.c of the XPerm package in the few examples
I tried (by a wide margin for very long tensors);
I have put in the tests a couple of
examples from test_xperm.c in cadabra, one of which runs in 0.1s
and hangs with xperm.c