freebsd with flexible iflib nic queues
Go to file
Daniel C. Sobral 6049d9f0eb Add Boyler-Moore algorithm to pre-matching test.
The BM algorithm works by scanning the pattern from right to left,
and jumping as many characters as viable based on the text's mismatched
character and the pattern's already matched suffix.

This typically enable us to test only a fraction of the text's characters,
but has a worse performance than the straight-forward method for small
patterns. Because of this, the BM algorithm will only be used if the
pattern size is at least 4 characters.

Notice that this pre-matching is done on the largest substring of the
regular expression that _must_ be present on the text for a succesful
match to be possible at all.

For instance, "(xyzzy|grues)" will yield a null "must" substring, and,
therefore, not benefit from the BM algorithm at all. Because of the
lack of intelligence of the algorithm that finds the "must" string,
things like "charjump|matchjump" will also yield a null string. To
optimize that, "(char|match)jump" should be used.

The setup time (at regcomp()) for the BM algorithm will most likely
outweight any benefits for one-time matches. Given the slow regex(3)
we have, this is unlikely to be even perceptible, though.

The size of a regex_t structure is increased by 2*sizeof(char*) +
256*sizeof(int) + strlen(must)*sizeof(int). This is all inside the
regex_t's "guts", which is allocated dynamically by regcomp(). If
allocation of either of the two tables fail, the other one is freed.
In this case, the straight-forward algorithm is used for pre-matching.

Tests exercising the code path affected have shown a speed increase of
50% for "must" strings of length four or five.

API and ABI remain unchanged by this commit.

The patch submitted on the PR was not used, as it was non-functional.

PR: 14342
2000-06-29 04:48:34 +00:00
bin Fix the rmdir -p a/b/c/ case, where rmdir -p a/b/c works, and rmdir c/ 2000-06-28 14:54:07 +00:00
contrib Change $FreeBSD$ placement. 2000-06-26 23:03:37 +00:00
crypto So /this/ is what has made OpenSSH's SSHv2 support never work right! 2000-06-27 21:16:06 +00:00
etc Added 400.status-pkg. 2000-06-28 14:37:22 +00:00
games Remove garbage. 2000-06-02 12:49:57 +00:00
gnu Fix the upgrade-build case. 2000-06-27 15:28:14 +00:00
include Moving forward on my commitment to always make at least one commit from 2000-06-22 01:46:25 +00:00
kerberos5 Properly separate the K5-only buld from K4. 2000-03-23 14:56:47 +00:00
kerberosIV Remove the last vestiges of libRSAglue now that it's an empty stub. 2000-03-11 22:34:10 +00:00
lib Add Boyler-Moore algorithm to pre-matching test. 2000-06-29 04:48:34 +00:00
libexec Fix a problem in the virtual host address compare code which caused 2000-06-26 05:36:09 +00:00
release Add options NETGRAPH_ETHER 2000-06-28 09:33:59 +00:00
sbin When printing out the transfer rate display for 'camcontrol inquiry', 2000-06-28 02:48:31 +00:00
secure MFI. This is a documentation-only, diffreducing patch, that if 2000-06-24 06:50:58 +00:00
share Reword the description of weekly_status_pkg_enable (although not 2000-06-27 12:04:43 +00:00
sys If kernel compiled with INVARIANTS: 2000-06-29 03:41:30 +00:00
tools Back out the previous change to the queue(3) interface. 2000-05-26 02:09:24 +00:00
usr.bin New libfetch-based fetch. 2000-06-28 16:55:15 +00:00
usr.sbin Further protection against comments in /etc/{passwd,group} 2000-06-28 09:31:31 +00:00
COPYRIGHT Update to add the July 22, 1999 addendum. 1999-09-05 21:33:47 +00:00
Makefile We have a new world order in libraries. 2000-02-24 23:03:16 +00:00
Makefile.inc1 Rearrange Perl's build priority; it needs to get made earlier. 2000-06-25 15:02:18 +00:00
Makefile.upgrade $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
README $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
UPDATING Added a dire sounding note about how crypto is required to build the 2000-06-29 00:34:54 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel and the contents of /etc.  Please see the top of the Makefile
in this directory for more information on the standard build targets
and compile-time flags.

Building a kernel with config(8) is a somewhat more involved process,
documentation for which can be found at:
   http://www.freebsd.org/handbook/kernelconfig.html
And in the config(8) man page.

The sample kernel configuration files reside in the sys/i386/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file LINT contains entries for all possible devices, not
just those commonly used, and is meant more as a general reference
than an actual kernel configuration file (a kernel built from it
wouldn't even run).


Source Roadmap:
---------------
bin		System/User commands.

contrib		Packages contributed by 3rd parties.

crypto		Export controlled stuff (see crypto/README).

etc		Template files for /etc

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberosIV	Kerberos package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		DES and DES-related utilities - NOT FOR EXPORT!

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/handbook/synching.html