Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Thursday February 24, 2005
01:53 AM

Performance tuning with Devel::Profile

[ #23347 ]

A short session with Devel::Profile led me from this:

time elapsed (wall):   17.6237
time running program:  13.2164  (74.99%)
time profiling (est.): 4.4072  (25.01%)
number of calls:       526792

To this:

time elapsed (wall):   11.4355
time running program:  8.7706  (76.70%)
time profiling (est.): 2.6649  (23.30%)
number of calls:       301198

Next, I'll be taking a look at Devel::Cover and Devel::SmallProf (which, coincidentally, is by the author of Language::Prolog::Yaswi, a "competitor" module to AI::Prolog).

Regrettably, to get that sort of performance enhancement, I had to engage in some serious encapsulation violations. This will make some further refactorings more difficult. I wonder if I made a mistake?

I've also noticed that some people's tests are failing. I can't replicate it on my machine, but it looks suspiciously like Scalar::Util::looks_like_number fails on 5.8.4 if the number is undefined. This doesn't seem right, though, as this is such a common function. Of course, I see that both of those failures are on boxes my boss owns. Perhaps a plot? On the other hand, all but one of the test reports are from boxes he owns. How depressing. I guess people aren't downloading it after all.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • $ perl -v
    This is perl, v5.8.4 built for i686-linux

    Copyright 1987-2004, Larry Wall

    Perl may be copied only under the terms of either the Artistic License or the
    GNU General Public License, which may be found in the Perl 5 source kit.

    Complete documentation for Perl, including FAQ lists, should be found on
    this system using `man perl' or `perldoc perl'.  If you have access to the
    Internet, point your browser at http://www.perl.com/, the Perl Home Page.

    $ perl -MScalar::Util -le 'print Scalar::Util::looks_