This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] More speedups, this time in build_trtable
- From: Jakub Jelinek <jakub at redhat dot com>
- To: bonzini at gnu dot org
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 16 Dec 2003 12:29:54 +0100
- Subject: Re: [PATCH] More speedups, this time in build_trtable
- References: <3FDF0A9F.9010102@polimi.it>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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