Next | Making Programs Faster | 152 |
SmallProf does produce some useful results, however
Here's the data sorted by CPU time:
count wall tm cpu time line
83 73.67689 31.70000 287: system $cmd;
1960 0.637309 0.340000 69: if (/^(\t|\s{5})/ && !($DIVERSION{active}
1896 0.659382 0.280000 94: if (/^-{12}/ || /^={32}/) {
1960 0.307705 0.240000 68: s{%(\w+)%}{exists $macro{$1} ? $macro{$1} :
1813 0.330660 0.210000 210: $accumulated .= $_ unless $skip_this;
1960 0.275886 0.200000 83: if ($MACROS && s/^\#MACRO\#\s+//) {
1960 0.337091 0.180000 67:while (<STDIN>) {
1960 0.250034 0.180000 91: next if /^\#{3}/;
1813 0.290792 0.180000 202: if ($DIVERSION{active} && (/^(\#\*| ) /
1897 0.284703 0.170000 92: last if /^-{50,}END/;
524 0.464508 0.150000 74: $length -= 3 while / \[\w\[ | \]\w\]/xg;
524 0.233224 0.100000 73: $length -= 2 while / \[ \[ | \] \]/xg;
Clearly, run time is dominated by line 287
285 my $cmd = qq{$TXT2HTML $enc --setvar MJD_FIRST_FILE=$firsthtml --setvar MJD_LAST_FILE=$lasthtml --setvar MJD_NEXT_FILE=$nexthtml --setvar MJD_PREV_FILE=$prevhtml --setvar MJD_SLIDE_NUMBER=$slideno --title '$title' $slide > $html}; 286 # print STDERR "Command: $cmd\n"; 287 system $cmd;
There's probably not too much we can do about this
Next | Copyright © 2003 M. J. Dominus |