[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: |
Tue, 22 Nov 2016 23:43:57 -0700 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Hi Paul.
> Why check whether TO and FROM are non-null?
Why not? Or is a core dump better? (Serious question.)
> > + {
> > + memset (to, 0, offsetof (struct dfa, dfaexec));
>
> This does more than copy syntax from FROM to TO. It also clears out the
> rest of TO. Is that the intent?
No. I'll remove it. It came along from dfasyntax.
> How does the function help improve gawk's performance?
Consider:
$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.
There are other cases as well.
> I looked in savannah gawk master but didn't see this function, so I
> guess you're using it in some non-published work.
Getting ready to include it. I wanted review of the dfa changes by the
grep team first.
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 <=
- Re: [Grep-devel] proposed new function for dfa, Paul Eggert, 2016/11/23
- 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, 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