Quantcast
Channel: nthykier
Viewing all articles
Browse latest Browse all 86

autodie 2.21

$
0
0

A couple of days ago, the upstream maintainer of autodie, Paul Jamieson Fenwick (PJF), released autodie 2.21.  It includes all of the performance improvements I had proposed in “Optimizing autodie” (plus a few extra ones authored after I wrote the post) and a small fix to one of the tests (due to changes in Carp).

As mentioned in my earlier post, these improvements gives about a factor 4 load time improvement in most cases.  For the sake of it, I have decided to use Lintian as an example of how good this improvement is.  First off, Lintian loads uses autodie in about 75 unique files in the current git master branch.

$ grep -lr 'use autodie' lib/ checks/ collection/ frontend/lintian | wc -l
75

As a simple benchmark, lets consider the following Perl one-liner:

$ /usr/bin/time -f "%es %Us %Ss" perl -Mautodie \
  -e 'print $autodie::VERSION, " => ";' \
  -e 'eval join("\n", map {"package X$_; use autodie;"} (1..74));'

A quick-n-dirty comparison gives:

2.20 => 0.91s 0.90s 0.01s
2.21 => 0.15s 0.15s 0.00s
# NB: the times are "wall, user and sys" in that order, in case you
# are too lazy to read time(1).  :) 

So, 2.21 is now closer to a factor 6 rather than the original factor 4. I have to admit that the timings seem to be “very machine dependent” as my laptop shows a factor 7 improvement (from ~1.39 to ~0.22s).

With at least 370 tests cases running in the Lintian testsuite, I can look forward to a reduction in “user time” on about 4 minutes.

 



Viewing all articles
Browse latest Browse all 86

Trending Articles