On Wed, 27 Dec 2000, Gunther Birznieks wrote:

> I don't completely understand the purpose of this benchmark.
>
> Are you testing string operations or print operations? Currently it seems
> as if the two are being tested together which doesn't necessarily provide
> the most meaning in the result.
>
> For example, is it the string concatenation that is slowing down the
> printing with string concatenation or is it a property of string
> concatenation that also happens to slow down printing because of how
> buffers behave in Apache?
>
> The single string print is not entirely realistic because no CGI perl
> program will really be able to get away with single string prints. It would
> be more interesting to see if
>
> (A) String Concatenation with the result being single printed
> vs
> (B) printing with straight string concatenation...
>
> Also, you may want to putz around with the buffer sizes to see if you get
> different results. If you are using large strings that may represent say
> 100 records of a table printing out with hyperlinks and stuff (a fairly
> largish page), then you might get drastically different results as those
> techniques that rely on the most internal buffer copying will show a marked
> decrease in performance -- more so than you show in this simple one.

Sorry for delay in answering this one.

Well, it was a benchmark showing the variaous print operation. You will
find the string concatenation benchmark in a separate section.

But the other point of all the benchmarks in the guide is to show examples
of how one can/should benchmark. Since no system is identical to other
system, people whose job is to do optimization of the service, or to code
in the optimized way are ought to run benchmarks anyway on their code.

So the benchmarks serve a dual purpose: "suggesting" a better way of
coding style and serving as an example how one should approach
optimisation task.

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


Reply via email to