[PATCH] More speedups, this time in build_trtable
Jakub Jelinek
jakub@redhat.com
Tue Dec 16 13:35:00 GMT 2003
On Tue, Dec 16, 2003 at 02:37:35PM +0100, Paolo Bonzini wrote:
> After Jakub's patch that disabled transit_state_sb, build_trtable
transit_state_sb removal has nothing to do with this FYI.
> 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).
In what locale?
Will not your patch set word_trtable = 1 even when without the patch it
would be clear? That would be a pessimization (a DFA state is built once
with build_trtable, but can be used many times during searching and when
word_trtable is set, transit_state needs to acquire context).
E.g. with a(\b[abc]|[def]). Perhaps it would be enough if just
group_nodes_into_DFAstates never created empty dests_ch[] bitsets.
Jakub
More information about the Libc-alpha
mailing list