Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-selector
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-selector
Commits
2c814949
Commit
2c814949
authored
Sep 20, 2020
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revise the big-O claim about .match().
parent
72e8490b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
README.rst
README.rst
+6
-5
vmod_selector.vcc
src/vmod_selector.vcc
+6
-5
No files found.
README.rst
View file @
2c814949
...
...
@@ -178,11 +178,12 @@ 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(1); for ``.hasprefix()`` it is O(*p*),
where *p* is the length of the longest string in the set that forms a
prefix of the string to be matched. 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.
``.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.
When new strings are added to a set (with new ``.add()`` statements in
``vcl_init``), the VCL code that executes the various operations
...
...
src/vmod_selector.vcc
View file @
2c814949
...
...
@@ -174,11 +174,12 @@ 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(1); for ``.hasprefix()`` it is O(*p*),
where *p* is the length of the longest string in the set that forms a
prefix of the string to be matched. 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.
``.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.
When new strings are added to a set (with new ``.add()`` statements in
``vcl_init``), the VCL code that executes the various operations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment