Self optimizing iterable

Paul Rubin http
Fri Jul 17 20:40:32 EDT 2009


Zac Burns <zac256 at gmail.com> writes:
> An example use case for this would be for something like a large table
> of regular expressions that would be iterated over trying to match in
> some string. If some regular expressions are more statistically more
> successful then the iteration will generally be short.

Generally if you are matching against a bunch of regexps, they will
tend to match overlapping sets, so you want to control precisely what
order they are tested in.  Having stuff bubble around based on hit
counts doesn't sound good.



More information about the Python-list mailing list