Apologies for tooting my own horn, but I have released Regexp::Assemble,
which does much the same thing, but has slightly different behaviour, it
merges common tails as well: fish, flash - f(la|i)sh. The above-cited
pattern becomes:
fla(?:t(?:ulent)?|bby|sh)
Toot toot. Regex::PreSuf
Steve Peters wrote:
On Wednesday 27 October 2004 03:17 pm, David Nicol wrote:
trie optimization for regexp groups means optimizing things like
m/(flash|flat|flatulent|flabby)\b/
into things like
m/fla(sh|bby|(t(|ulent)))\b/
right?
I wonder if it would be possible to do it with a regex
trie optimization for regexp groups means optimizing things like
m/(flash|flat|flatulent|flabby)\b/
into things like
m/fla(sh|bby|(t(|ulent)))\b/
right?
I wonder if it would be possible to do it with a regex preprocessor.
On Tue, 26 Oct 2004 11:49:13 +0100, Nicholas Clark
On Wednesday 27 October 2004 03:17 pm, David Nicol wrote:
trie optimization for regexp groups means optimizing things like
m/(flash|flat|flatulent|flabby)\b/
into things like
m/fla(sh|bby|(t(|ulent)))\b/
right?
I wonder if it would be possible to do it with a regex
Dave Mitchell wrote at 25 October 2004 22:38:
On Mon, Oct 25, 2004 at 09:09:16PM +0200, Elizabeth Mattijsen wrote:
Wouldn't you need to add taking a ref of the var, to
invalidate this
optimization? Specifically for this case:
sub statename {
my $name = 'david';
${\$name}
At 10:30 AM +0100 10/26/04, Orton, Yves wrote:
Dave Mitchell wrote at 25 October 2004 22:38:
On Mon, Oct 25, 2004 at 09:09:16PM +0200, Elizabeth Mattijsen wrote:
Wouldn't you need to add taking a ref of the var, to
invalidate this
optimization? Specifically for this case:
sub statename
On Tue 26 Oct 2004 12:24, Elizabeth Mattijsen [EMAIL PROTECTED] wrote:
sub statename {
my $name = 'david';
${\$name} = 'liz';
return hello, my name is $name;
}
But surely in this case the ${\$name} should itself be optimised to $name
first?
Well, possibly. I
On Tue, Oct 26, 2004 at 12:32:07PM +0200, H.Merijn Brand wrote:
On Tue 26 Oct 2004 12:24, Elizabeth Mattijsen [EMAIL PROTECTED] wrote:
sub statename {
my $name = 'david';
${\$name} = 'liz';
return hello, my name is $name;
}
But surely in this case the
On Tue, 26 Oct 2004 10:30:08 +0100, Orton, Yves [EMAIL PROTECTED] wrote:
You cant detect the consequence of the eval but you can detect the eval no?
So you could disable the optimisation if there is no eval between the
constant assignment and the stringification
yeah that's what I was
At 5:10 PM -0500 10/21/04, David Nicol wrote:
when a lexical variable is not written to between getting assigned
from a constant and getting interpolated, replace the value in the
string at compile time
example:
sub statename{
my $name = 'david';
return hello my name is $name;
}
Wouldn't you
On Mon, Oct 25, 2004 at 09:09:16PM +0200, Elizabeth Mattijsen wrote:
Wouldn't you need to add taking a ref of the var, to invalidate this
optimization? Specifically for this case:
sub statename {
my $name = 'david';
${\$name} = 'liz';
return hello, my name is $name;
}
Then
okay. so lexicals that have not had references taken from them and
have not existed
while an eval is in place in their scope
get marked as early replacable whenver they get a constant
assigned, and the flag gets cleared when
assigned to by something not a constant
a reference is
On Mon, Oct 25, 2004 at 04:25:57PM -0500, David Nicol wrote:
okay. so lexicals that have not had references taken from them and
have not existed
while an eval is in place in their scope
get marked as early replacable whenver they get a constant
assigned, and the flag gets cleared when
when a lexical variable is not written to between getting assigned
from a constant and getting interpolated, replace the value in the
string at compile time
example:
sub statename{
my $name = 'david';
return hello my name is $name;
}
--
David L Nicol
transportation infrastructure
14 matches
Mail list logo