I did this on two machines: an old dog, and a new burner. System 1: HP 9000 Model H50 (PA-7100, 96 Mhz), 256 MB RAM, HP-UX 10.20
$ perl -v This is perl, version 5.005_03 built for PA-RISC1.1 results: Benchmark: timing 1000000 iterations of Grep, Max, Ternary... Grep: 26 wallclock secs (21.98 usr + 0.17 sys = 22.15 CPU) Max: 33 wallclock secs (31.87 usr + 0.07 sys = 31.94 CPU) Ternary: 35 wallclock secs (33.29 usr + 0.13 sys = 33.42 CPU)
System 2: HP9000 C3000 (PA-8500, 400 Mhz), 512 MB RAM, HP-UX 10.20
Same version of perl results: Benchmark: timing 1000000 iterations of Grep, Max, Ternary... Grep: 5 wallclock secs ( 4.83 usr + 0.00 sys = 4.83 CPU) Max: 7 wallclock secs ( 6.77 usr + 0.01 sys = 6.78 CPU) Ternary: 7 wallclock secs ( 6.90 usr + 0.00 sys = 6.90 CPU)
These are my answers, and I'm sticking to them!

In reply to RE: Algorithm Efficiency vs. Specialized Hardware? by husker
in thread Algorithm Efficiency vs. Specialized Hardware? by Russ

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.