Possible Duplicate:
How is string.find implemented in CPython?
I have read many posts here in stack-overflow comparing the performance of sub-string search (e.g. Python string search efficiency,
Is this the most efficient way to search for a substring?,
substring in python, etc…)
I have also looked at the source code implementation of contains abstract.c.
As far as i see the built-in implementation is an iterative one : python docs
Does python have an implementation of more sufficient techniques for finding a substring: Boyer–Moore Algorithm,
Rabin–Karp algorithm, etc…
???
EDIT
The question has been extended:
Python: Improving sub-string search by embedding sophisticated algorithms.
The actual cpython string search implementation is here:
http://hg.python.org/cpython/file/tip/Objects/stringlib/fastsearch.h
It appears to use Boyer-Moore.