News for hackers. Stuff that matters.
Re:Fast Algorithms for Exact String Matching by pmjordan on Sunday October 04, 2015 @02:22PM (#10328294)
I'm going by the abstract here, but:

You'd build the suffix tree from the haystack, whereas their algorithm preprocesses the needle.

So I guess it mostly depends if you're going to be repeatedly searching different strings in the same document, or if you're searching for the same string in many different documents. Plus, space requirements might be relevant too, as a preprocessed haystack is probably bigger than a preprocessed needle.

There are no comments on this comment yet.