improved performance by parallelizing the input string instead of the search string