bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Grep-devel] [PATCH] dfa: fix performance bug that recomputes trans


From: Jim Meyering
Subject: Re: [Grep-devel] [PATCH] dfa: fix performance bug that recomputes trans
Date: Fri, 9 Dec 2016 16:08:52 -0800

On Fri, Dec 9, 2016 at 3:11 PM, Paul Eggert <address@hidden> wrote:
> * lib/dfa.c (build_state): Fix performance bug introduced in Nov
> 25 on-demand changes.  The bug caused build_state to reset all
> d->trans elements to -2 even when d->trans was already non-null.
> Use C99 style decls after statements in this function.
> ---
>  ChangeLog |  6 ++++++
>  lib/dfa.c | 46 ++++++++++++++++++++--------------------------
>  2 files changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index fd3e9d8..a05fa6b 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,5 +1,11 @@
>  2016-12-09  Paul Eggert  <address@hidden>
>
> +       dfa: fix performance bug that recomputes trans
> +       * lib/dfa.c (build_state): Fix performance bug introduced in Nov
> +       25 on-demand changes.  The bug caused build_state to reset all
> +       d->trans elements to -2 even when d->trans was already non-null.
> +       Use C99 style decls after statements in this function.

Thank you for both of those changes. In the future, please keep
semantics-changing diffs separate from those like the
declaration-moving one that is nominally in the NSC
(no-semantic-change) category.

Do you have an example (preferably pathological) that demonstrates a
significant performance difference? If so, I'd like to mention this in
grep's NEWS file.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]