skip unnecessary copies in sort