Improve performance of string subsets