Commit 15c11469 authored by Geoff Simmons's avatar Geoff Simmons

Make less specific claims about the running time for matches.

The complexity analysis can be highly nuanced. Sets with many strings
and/or long strings can in fact require more time for matching due
to locality effects, which depends highly on usage patterns. Prefix
matches can be longer for large sets since the depth of branching
in the trie becomes larger.

But these are considerations at the level of micro-optimization.
It's the difference between two- or three-digit nanosecond mean
times for the matches.

So it suffices to claim that matching is fast and scales well.
parent ad22becd
......@@ -179,13 +179,9 @@ lines. For example::
}
Matches with the ``.match()`` and ``.hasprefix()`` methods scale well
as the number of strings in the set increases. The time needed for
``.match()`` is formally O(*l*), where *l* is the length of the
subject string (the string to be matched). For ``.hasprefix()`` it is
O(*p*), where *p* is the length of the longest string in the set that
forms a prefix of the subject. In both cases, the number of execution
steps is independent of the number of strings in the set, and is
predictable and fast for large sets of strings.
as the number of strings in the set increases. Experience has shown
that both operations are predictable and fast for large sets of
strings.
When new strings are added to a set (with new ``.add()`` statements in
``vcl_init``), the VCL code that executes the various operations
......
......@@ -175,13 +175,9 @@ lines. For example::
}
Matches with the ``.match()`` and ``.hasprefix()`` methods scale well
as the number of strings in the set increases. The time needed for
``.match()`` is formally O(*l*), where *l* is the length of the
subject string (the string to be matched). For ``.hasprefix()`` it is
O(*p*), where *p* is the length of the longest string in the set that
forms a prefix of the subject. In both cases, the number of execution
steps is independent of the number of strings in the set, and is
predictable and fast for large sets of strings.
as the number of strings in the set increases. Experience has shown
that both operations are predictable and fast for large sets of
strings.
When new strings are added to a set (with new ``.add()`` statements in
``vcl_init``), the VCL code that executes the various operations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment