There's no need to do any "prerunning" to avoid penalties for a first run. If the first argument to timethese (and hence, to cmpthese) is negative, Benchmark will run the code for at least that number of seconds. But in order to know how many times the code needs to be run, it will first run the code several times to get an indication how often it needs to run to satisfy the requirement. So, any first run penalties have already been paid.

Of course, if there's a significant difference between a first run and any subsequent runs, the use of the Benchmark module is isn't very useful anyway.

Abigail


In reply to Re: Reading from the end of a file. by Abigail-II
in thread Reading from the end of a file. by BrowserUk

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.