I wonder if you've overlooked my solution, or if there's anything wrong with it.

Indeed I did, as it was posted as a reply to someone else. And no, there is nothing wrong with it.

It beats out salva's (just), and is a simple, clean, and direct implementation of the requirements. I have my winner. Thank you.

Now I've seen it, I'm somewhat chagrined that I didn't see it for myself. It would still be my winner even if it were slightly slower than the flags & resets versions.

Yours is xA below:

[19:48:48.65] c:\test>junk -I=3 ABCDEF 12 Rate x0 x3 x9 x8 x5 x4 x6 x7 xA x0 9794/s -- -8% -13% -19% -35% -36% -38% -43% -51% x3 10606/s 8% -- -6% -12% -30% -31% -33% -39% -46% x9 11286/s 15% 6% -- -6% -25% -26% -29% -35% -43% x8 12063/s 23% 14% 7% -- -20% -21% -24% -30% -39% x5 15122/s 54% 43% 34% 25% -- -1% -5% -12% -24% x4 15340/s 57% 45% 36% 27% 1% -- -3% -11% -23% x6 15863/s 62% 50% 41% 32% 5% 3% -- -8% -20% x7 17248/s 76% 63% 53% 43% 14% 12% 9% -- -13% xA 19822/s 102% 87% 76% 64% 31% 29% 25% 15% -- [19:49:50.63] c:\test>junk -I=3 ABCDEF 120 Rate x0 x3 x4 x8 x9 x6 x5 x7 xA x0 275/s -- -20% -21% -80% -80% -86% -86% -91% -92% x3 341/s 24% -- -2% -75% -75% -82% -83% -89% -90% x4 349/s 27% 2% -- -75% -75% -82% -82% -89% -90% x8 1383/s 404% 305% 296% -- -0% -29% -30% -57% -59% x9 1386/s 405% 306% 297% 0% -- -29% -30% -57% -59% x6 1945/s 608% 470% 457% 41% 40% -- -1% -40% -42% x5 1971/s 618% 477% 465% 43% 42% 1% -- -39% -41% x7 3216/s 1071% 842% 821% 133% 132% 65% 63% -- -4% xA 3346/s 1119% 880% 859% 142% 141% 72% 70% 4% -- [19:50:43.49] c:\test>junk -I=3 ABCDEF 1200 Rate x4 x0 x3 x8 x9 x6 x5 x7 +xA x4 3.33/s -- -0% -8% -98% -98% -98% -98% -99% -9 +9% x0 3.33/s 0% -- -8% -98% -98% -98% -98% -99% -9 +9% x3 3.61/s 8% 8% -- -97% -98% -98% -98% -99% -9 +9% x8 137/s 4019% 4019% 3700% -- -8% -25% -27% -61% -6 +3% x9 149/s 4366% 4366% 4020% 8% -- -19% -21% -58% -6 +0% x6 183/s 5392% 5392% 4966% 33% 23% -- -3% -48% -5 +0% x5 189/s 5578% 5578% 5138% 38% 27% 3% -- -46% -4 +9% x7 351/s 10434% 10434% 9618% 156% 136% 92% 86% -- - +5% xA 368/s 10960% 10960% 10104% 169% 148% 101% 95% 5% +--

In reply to Re^4: Random data generation. by BrowserUk
in thread Random data generation. 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.