[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Grep-devel] proposed new function for dfa
From: |
arnold |
Subject: |
Re: [Grep-devel] proposed new function for dfa |
Date: |
Wed, 23 Nov 2016 00:56:17 -0700 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
> Yes, a core dump is better if the philosophy is to fail hard rather than
> sweep software errors under the rug, which is the approach used elsewhere
> in dfa.c. For example, on my platform dfasyntax crashes reliably if
> its first argument is a null pointer.
OK, I'll remove the check.
> > $1 ~ $2 { .... }
> >
> > The second field on each line is compiled as a regexp, for every line.
> > There's no reason to recompute all the syntax settings every time since
> > the syntax bits don't change over any given invocation of gawk.
>
> Isn't the cost of recomputing syntax settings dwarfed by the cost of
> compiling the regexp?
I don't remember the case, but I did some profiling and in this case
dfasyntax was using a huge percentage of CPU time. I could try to
reproduce it if I really need to convince you. Or else I will just
keep it as a gawk-only change.
Thanks,
Arnold
- [Grep-devel] proposed new function for dfa, Arnold Robbins, 2016/11/22
- Re: [Grep-devel] proposed new function for dfa, Paul Eggert, 2016/11/22
- Re: [Grep-devel] proposed new function for dfa, arnold, 2016/11/23
- Re: [Grep-devel] proposed new function for dfa, Paul Eggert, 2016/11/23
- Re: [Grep-devel] proposed new function for dfa,
arnold <=
- Re: [Grep-devel] proposed new function for dfa, Paul Eggert, 2016/11/23
- Re: [Grep-devel] proposed new function for dfa, arnold, 2016/11/24
- Re: [Grep-devel] proposed new function for dfa, Norihiro Tanaka, 2016/11/24
- Re: [Grep-devel] proposed new function for dfa, Paul Eggert, 2016/11/23
- Re: [Grep-devel] proposed new function for dfa, Arnold Robbins, 2016/11/29