>>>>> "Tomas" == Tomas Vondra <tv(at)fuzzy(dot)cz> writes:
Tomas> If we can get rid of the excessive ChainAggregate, that's
Tomas> certainly enough for now.
I found an algorithm that should provably give the minimal number of sorts
(I was afraid that problem would turn out to be NP-hard, but not so - it's
solvable in P by reducing it to a problem of maximal matching in bipartite
graphs).
Updated patch should be forthcoming in a day or two.
--
Andrew (irc:RhodiumToad)