Genralised benchmarks are nearly always useless. That is to say, producing a benchmark that tests a feature or set of features in isolation of a real application for it or them, produces a set of numbers that have little relevance to anything--other than the benchmark.

For example, it's not hard to produce a benchmark that shows that some string operations have gotten slower in recent versions of Perl. But what those numbers won't indicate is that those recent Perl's now support unicode operations. If you don't need unicode, that may seems detrimental; but if you do need unicode, the performance benefit of it being integral to Perl rather than an add-on (or worse, self-implemented) is huge.

Likewise, benchmarking assembler against Perl would (probably; I haven't tried it:), show that assembler is faster--but you will almost certainly not switch to assembler for performing most of the things that you would do with Perl. That's because once you consider the time taken to write the programs, as well as the time taken to run them, Perl wins hands down. At least until the program has been run hundreds, if not thousands of times. If the program has to run on two or more platforms, Perl's performance will look even better.

Benchmarking is only really useful for comparing different implementations of actual applications. Any other use only provides ammunition for endless and pointless debate:)


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

In reply to Re: Perl Benchmark Resources? by BrowserUk
in thread Perl Benchmark Resources? by doowah2004

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.