Date: Sun, 3 Jul 2011 15:28:32 +0000 (UTC) From: Gabor Kovesdan <gabor@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r223738 - user/gabor/tre-integration/contrib/tre/lib Message-ID: <201107031528.p63FSWkT023613@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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++)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107031528.p63FSWkT023613>