Improve performance of concatWith.