Now here's the fix that brings the worst-case complexity down from O(n*m)
to O(n). One could use either the Knuth-Morris-Pratt or the Boyer-Moore
algorithm. I'm using the former one, because Boyer-Moore works "backwards",
which is harder to generalize to the mbsstr case.
2007-02-11 Bruno Haible
The "check that the asymptotic worst-case complexity is not quadratic"
fails: it takes eternities. I'm therefore going to add a catch for
worst-case linear complexity. This is impossible with the current over-
optimized 'goto' spaghetti implementation, so I'm replacing it with a
maintainable implem
Hi,
I'm starting to speed up the substring search functions. First, a test case.
2007-02-11 Bruno Haible <[EMAIL PROTECTED]>
* modules/c-strstr-tests: New file.
* tests/test-c-strstr.c: New file.
== modules/c-strstr-tests ==