does anyone know which string matching algorithm is implemented in Python?
+7
A:
Per the sources, it's a
fast search/count implementation, based on a mix between boyer-moore and horspool, with a few more bells and whistles on the top. for some more background, see: http://effbot.org/zone/stringlib.htm
The essay in question is really well worth reading!
Alex Martelli
2010-01-17 01:50:31
+1
A:
I assume you're talking about CPython. In that case, you could always check the source (see fastsearch.h).
BlueRaja - Danny Pflughoeft
2010-01-17 02:30:16