in reply to Re: regex gotcha moving from 5.8.8 to 5.30.0?
in thread regex gotcha moving from 5.8.8 to 5.30.0?
Hmm, that's interesting, there is some data-dependency! My first attempt to make some fake data, like yours, didn't lead to any performance difference between 5.8.8 and 5.30.0. So I made the data-faker a little smarter (in particular, multi-line begfoo declarations) and was able to get a delta to show up:
my $num = shift or die "num?\n"; for my $i (0 .. $num) { my @in = map { "input$_" } (0..int(rand(100))); my @out = map { "output$_" } (0..int(rand(100))); print "begfoo FOO_$i (\n", join(",\n", @in, @out), ");\n"; print " input $_;\n" foreach @in; print " output $_;\n" foreach @out; print " foo inst$_ (j, k, l, m, n, o, p);\n" foreach 0 .. int(ran +d(100)); print "endfoo\n\n"; }
I generated some dummy output with 50000 definitions: "make_out.pl 50000 > 50k.foo", giving a file about 263Mb and that was large/real enough to show a definite 2x difference:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: regex gotcha moving from 5.8.8 to 5.30.0?
by choroba (Cardinal) on Feb 09, 2021 at 22:44 UTC | |
by mordibity (Acolyte) on Feb 10, 2021 at 00:16 UTC |