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:
- 5.8.8 : 0.01s user 0.02s system 0% cpu 14.474 total
- 5.30.0 : 0.01s user 0.02s system 0% cpu 37.312 total