Next Making Programs Faster 74

smallprof.out

================ SmallProf version 0.9 ================
Profile of Pod/Parser.pm                    Page 174

     count wall tm  cpu time line
        0 0.000000 0.000000   785:    ## capturing parens keeps the delimiters)
     1440 0.175561 0.200000   786:    $_ = $text;
        0 0.000000 0.000000   787:#    my @tokens = split /([A-Z]<(?:<+\s)?)/;
     1440 0.286681 0.460000   788:    my @tokens = split /([A-Z]  <          #
        0 0.000000 0.000000   789:                (?: [^<>]* >      # ... and
        0 0.000000 0.000000   790:                  | (?: <+ \s )?  # OR a
        0 0.000000 0.000000   791:                    ))/x;
        0 0.000000 0.000000   792:#    { local $" = ")\n("; warn "tokens:
     7160 0.561213 0.970000   793:    while ( @tokens ) {
     5720 0.523698 0.900000   794:        $_ = shift @tokens;
     5720 0.376381 0.770000   795:        next unless length;
        0 0.000000 0.000000   796:        ## Look for an entire simple sequence
     5652 0.924686 1.030000   797:        if ( /^([A-Z])<([^<>]*)>$/ ) {
     2083 1.415592 1.390000   798:            $seq = Pod::InteriorSequence-
        0 0.000000 0.000000   799:                       -name   => $1,
        0 0.000000 0.000000   800:                       -ldelim => "<",  -
        0 0.000000 0.000000   801:                       -file   => $file,    -
        0 0.000000 0.000000   802:                   );
     2083 1.182618 1.080000   803:            $seq->append($2) if length($2);
     2083 0.179391 0.220000   804:            $seq->nested($seq_stack[-1]) if
     2083 0.576378 0.540000   805:            $seq_stack[-1]-
        0 0.000000 0.000000   806:        }
        0 0.000000 0.000000   807:        ## Look for the beginning of a
        0 0.000000 0.000000   808:        elsif ( /^([A-Z])(<(?:<+\s)?)$/ ) {
        0 0.000000 0.000000   809:            ## Push a new sequence onto the
       38 0.003812 0.010000   810:            ($cmd, $ldelim) = ($1, $2);
       38 0.029990 0.020000   811:            $seq = Pod::InteriorSequence-
        0 0.000000 0.000000   812:                       -name   => $cmd,
        0 0.000000 0.000000   813:                       -ldelim => $ldelim,  -
        0 0.000000 0.000000   814:                       -file   => $file,    -
        0 0.000000 0.000000   815:                   );


Next Copyright © 2003 M. J. Dominus