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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.