[PATCH] More speedups, this time in build_trtable
Paolo Bonzini
paolo.bonzini@polimi.it
Tue Dec 16 12:43:00 GMT 2003
After Jakub's patch that disabled transit_state_sb, build_trtable
frequently shows up at the top of the profiles. This patch divides the
inner loop in two (for state->word_trtable == 0 or == 1 respectively)
and rewrites the iteration on bitsets so that it does not iterate on
empty items. The result is a 20% improvement in the time needed to run
the sed testsuite on my machine, with a top improvement of 2x on
madding.sed (which is a search for a very long string).
Thanks,
Paolo
2002-12-16 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (build_trtable): don't allocate the trtable
until state->word_trtable is known. Don't hardcode UINT_BITS
iterations on each bitset item.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: regex-speedup-build-trtable.patch
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20031216/fa1729ce/attachment.ksh>
More information about the Libc-alpha
mailing list