Scott David Daniels wrote: > Looking for "not there" in "not the xyz"*100 using Boyer-Moore should do > about 300 probes once the table is set (the underscores below): > > not the xyznot the xyznot the xyz... > not ther_ > not the__ > not ther_ > not the__ > not ther_ > ...
yup; it gets into a 9/2/9/2 rut. tweak the pattern a little, and you get better results for BM. ("kill" is of course an understatement, but BM usually works better. but it still needs a sizeof(alphabet) table, so you can pretty much forget about it if you want to support unicode...) </F> _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com