However, naïve application of query-level parallelism leads to a large number of wasted threads, since most long substrings of an input sentence will not be found in the text.
we employ a novel two-pass strategy: in the first pass, we simply compute, for each position i in the input sentence, the length j of the longest substring in F that appears in T .