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
c7cf637f
Commit
c7cf637f
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
2c73efba
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 @
c7cf637f
...
@@ -178,11 +178,12 @@ lines. For example::
...
@@ -178,11 +178,12 @@ lines. For example::
Matches with the ``.match()`` and ``.hasprefix()`` methods scale well
Matches with the ``.match()`` and ``.hasprefix()`` methods scale well
as the number of strings in the set increases. The time needed for
as the number of strings in the set increases. The time needed for
``.match()`` is formally O(1); for ``.hasprefix()`` it is O(*p*),
``.match()`` is formally O(*l*), where *l* is the length of the
where *p* is the length of the longest string in the set that forms a
subject string (the string to be matched). For ``.hasprefix()`` it is
prefix of the string to be matched. In both cases, the number of
O(*p*), where *p* is the length of the longest string in the set that
execution steps is independent of the number of strings in the set,
forms a prefix of the subject. In both cases, the number of execution
and is predictable and fast for large sets of strings.
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
When new strings are added to a set (with new ``.add()`` statements in
``vcl_init``), the VCL code that executes the various operations
``vcl_init``), the VCL code that executes the various operations
...
...
src/vmod_selector.vcc
View file @
c7cf637f
...
@@ -174,11 +174,12 @@ lines. For example::
...
@@ -174,11 +174,12 @@ lines. For example::
Matches with the ``.match()`` and ``.hasprefix()`` methods scale well
Matches with the ``.match()`` and ``.hasprefix()`` methods scale well
as the number of strings in the set increases. The time needed for
as the number of strings in the set increases. The time needed for
``.match()`` is formally O(1); for ``.hasprefix()`` it is O(*p*),
``.match()`` is formally O(*l*), where *l* is the length of the
where *p* is the length of the longest string in the set that forms a
subject string (the string to be matched). For ``.hasprefix()`` it is
prefix of the string to be matched. In both cases, the number of
O(*p*), where *p* is the length of the longest string in the set that
execution steps is independent of the number of strings in the set,
forms a prefix of the subject. In both cases, the number of execution
and is predictable and fast for large sets of strings.
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
When new strings are added to a set (with new ``.add()`` statements in
``vcl_init``), the VCL code that executes the various operations
``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