three characters. It appears that Raita is not aware of the old last-character precheck (he believed that the backward-only routine is the Horspool implementation), so readers are advised to take the results with a grain of salt. On modern machines, library functions like tends to provide better throughput than any of the hand-written comparison loops. The behavior of an "SFC" loop (Horspool's terminology) both in libstdc++ and libc++ seems to suggest that a modern Raita implementation should not include any of the one-character shifts, since they have detrimental effects on data alignment. Also see String-searching algorithm which has detailed analysis of other string searching algorithms. References External links Description of the algorithm An implementation from V8 JavaScript engine written in C++ String matching algorithms Articles with example C code