Stephen Zander wrote:
> 
> >>>>> "Stas" == Stas Bekman <[EMAIL PROTECTED]> writes:
>     Stas> Ouch :( Someone to explain this phenomena? and it's just
>     Stas> fine under the handler.... puzzled, what can I say...
> 
> Continuous array growth and copying?

Is this a question or a suggestion? but in both cases (mod_perl and perl
benchmark) the process doesn't exit, so the allocated datastructure is
reused... anyway it should be the same. But it's not.

Just to remind the context (please quote the relevant parts or it's
impossible to understand what are you talking about. Thanks!):

handler:

single_print    |    108      5000      0    890 
here_print      |    110      5000      0    887 
concat_print    |    111      5000      0    876 
aggrlist_print  |    113      5000      0    862 
list_print      |    113      5000      0    861 
multi_print     |    118      5000      0    820 

unbuffered benchmark:

single_print:    2 wallclock secs ( 2.29 usr +  0.46 sys =  2.75 CPU)
here_print:      2 wallclock secs ( 2.42 usr +  0.50 sys =  2.92 CPU)
list_print:      7 wallclock secs ( 7.26 usr +  0.53 sys =  7.79 CPU)
concat_print:    9 wallclock secs ( 8.90 usr +  0.60 sys =  9.50 CPU)
aggrlist_print: 32 wallclock secs (32.37 usr +  0.71 sys = 33.08 CPU)
multi_print:    21 wallclock secs (16.47 usr +  5.84 sys = 22.31 CPU)

buffered benchmark:

single_print:    3 wallclock secs ( 1.69 usr +  0.02 sys =  1.71 CPU)
here_print:      3 wallclock secs ( 1.76 usr +  0.01 sys =  1.77 CPU)
list_print:      7 wallclock secs ( 6.41 usr +  0.03 sys =  6.44 CPU)
concat_print:    8 wallclock secs ( 8.23 usr +  0.05 sys =  8.28 CPU)
multi_print:    10 wallclock secs (10.70 usr +  0.01 sys = 10.71 CPU)
aggrlist_print: 30 wallclock secs (31.06 usr +  0.04 sys = 31.10 CPU)

Watch the aggrlist_print gives such a bad perl benchmark, but very good
handler benchmark...

  sub aggrlist_print{
    my @buffer = ();
    push @buffer,"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n";
    push @buffer,"<HTML>\n";
    push @buffer,"  <HEAD>\n";
[snip]
    push @buffer,"</HTML>\n";
    print @buffer;
  }


 
_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://perl.org     http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org

Reply via email to