8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5afc66 commit ed56aa0Copy full SHA for ed56aa0
Objects/stringlib/fastsearch.h
@@ -13,9 +13,11 @@
13
it has actually checked for matches, but didn't find any. callers
14
beware! */
15
16
-/* If the needle is long enough, use Crochemore and Perrin's Two-Way
17
- algorithm, which has guaranteed O(n) runtime. Also compute a table
18
- of shifts to sometimes achieve O(n/m) runtime in the best cases. */
+/* If the strings are long enough, use Crochemore and Perrin's Two-Way
+ algorithm, which has worst-case O(n) runtime and best-case O(n/k).
+ Also compute a table of shifts to achieve O(n/k) in more cases,
19
+ and often (data dependent) deduce larger shifts than pure C&P can
20
+ deduce. */
21
22
#define FAST_COUNT 0
23
#define FAST_SEARCH 1
0 commit comments