Most of the time, perl's performance is a total non-issue for me. When
it is, I'm generally doing the same things as Dan (ie, things resembling
dd if=/dev/hda | perl -e ...). I posted some vague benchmarky ideas to
perl6-meta at one point. Here they are again:
-----
You did ask at one point for some suggestions of other speed goals. So
here are example subgoals:
1. Methods are close enough in speed to subroutine calls (<=20% slower?)
that nobody will avoid using them for performance reasons.
2. A fairly tight loop with a subroutine call is <N% slower than the
same loop inlined.
3. Parsing a binary data file and converting it to ASCII output should
be within N% of the equivalent program written in C (assuming a very
simple conversion).
4. A minimal complete CGI program using CGI.pm =~ p526 should be N%
faster (Exporter.pm speedup.)
5. Regular expressions do not get slower. Oops, I mean: are >N% faster.
6. Grepping for a variable-sized regular expression on a nonblocking
pipe is >N% faster (with incremental regular expression matching, N can
be superlinear.)
-----
They're all too ill-defined to test, but maybe the first step is to
enumerate a bunch of general tasks where performance is likely to
matter. Let's see...:
1. Binary parsing
2. Sucking data off of disk and spewing it back out (presumably
modifying it on the way through)
3. Calling subroutines
4. Calling methods
5. Matching
6. Matching variable-length things while juggling buffers
7. use'ing big modules
8. Math
9. General parsing (something requiring a mixture of code and regexes)
10. Tk-style callback frenzies and mark/tag manipulation (?)
11. external (XS) code in tight loops
12. Lots of concurrent instantiations of things with big shareable stuff
(eg CGI.pm) (more of a space than speed issue, though the former tends
to turn into the latter)
If I were to write up a Perl5 benchmark addressing one or a few of
these, where should I put it?
(Crossposted to -internals)