[Resolver] More efficient sorting