A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2000-August/007840.html below:

[Python-Dev] SRE 0.9.8 benchmarks

[Python-Dev] SRE 0.9.8 benchmarksFredrik Lundh Fredrik Lundh" <effbot@telia.com
Thu, 3 Aug 2000 13:10:24 +0200
mal wrote:

> Just for compares: would you mind running the search=20
> routines in mxTextTools on the same machine ?

> > searching for "spam" in a string padded with "spaz" (1000 bytes on
> > each side of the target):
> >=20
> > string.find     0.112 ms

texttools.find    0.080 ms

> > sre8.search     0.059
> > pre.search      0.122
> >=20
> > unicode.find    0.130
> > sre16.search    0.065
> >=20
> > same test, without any false matches (padded with "-"):
> >=20
> > string.find     0.035 ms

texttools.find    0.083 ms

> > sre8.search     0.050
> > pre.search      0.116
> >=20
> > unicode.find    0.031
> > sre16.search    0.055
>=20
> Those results are probably due to the fact that string.find
> does a brute force search. If it would do a last match char
> first search or even Boyer-Moore (this only pays off for long
> search targets) then it should be a lot faster than [s|p]re.

does the TextTools algorithm work with arbitrary character
set sizes, btw?

</F>




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4