svn commit: r223738 - user/gabor/tre-integration/contrib/tre/lib

Gabor Kovesdan gabor at FreeBSD.org
Sun Jul 3 15:28:32 UTC 2011


Author: gabor
Date: Sun Jul  3 15:28:32 2011
New Revision: 223738
URL: http://svn.freebsd.org/changeset/base/223738

Log:
  - Increase hash table size to reduce collisions and thus the lookup overhead

Modified:
  user/gabor/tre-integration/contrib/tre/lib/fastmatch.c

Modified: user/gabor/tre-integration/contrib/tre/lib/fastmatch.c
==============================================================================
--- user/gabor/tre-integration/contrib/tre/lib/fastmatch.c	Sun Jul  3 15:27:20 2011	(r223737)
+++ user/gabor/tre-integration/contrib/tre/lib/fastmatch.c	Sun Jul  3 15:28:32 2011	(r223738)
@@ -96,7 +96,7 @@ tre_fastcomp_literal(fastmatch_t *fg, co
   /* Preprocess pattern. */
 #ifdef TRE_WCHAR
   fg->defBc = fg->len;
-  fg->qsBc = hashtable_init(fg->len, sizeof(tre_char_t), sizeof(int));
+  fg->qsBc = hashtable_init(fg->len * 3, sizeof(tre_char_t), sizeof(int));
   if (fg->qsBc == NULL)
     return -1;
   for (unsigned int i = 1; i < fg->len; i++)


More information about the svn-src-user mailing list