array => sub { my @list = @input; @list[@input] = @input; Compare(\@list,\@output) or die "@list" if DO_CHECK; },

When added, outputs:

Rate johngg Tux pryrt choroba0 choroba choroba2 grepfirs +t sortfirst Eily array johngg 6047/s -- -26% -36% -57% -67% -69% -70 +% -73% -83% -93% Tux 8142/s 35% -- -14% -42% -55% -58% -60 +% -64% -77% -90% pryrt 9471/s 57% 16% -- -32% -48% -51% -54 +% -58% -73% -89% choroba0 13922/s 130% 71% 47% -- -23% -28% -32 +% -38% -61% -83% choroba 18181/s 201% 123% 92% 31% -- -6% -11 +% -19% -49% -78% choroba2 19424/s 221% 139% 105% 40% 7% -- -5 +% -13% -45% -77% grepfirst 20451/s 238% 151% 116% 47% 12% 5% - +- -8% -42% -75% sortfirst 22333/s 269% 174% 136% 60% 23% 15% 9 +% -- -37% -73% Eily 35540/s 488% 337% 275% 155% 95% 83% 74 +% 59% -- -57% array 83332/s 1278% 923% 780% 499% 358% 329% 307 +% 273% 134% --

It passes your test case, so for (some) perl golfs, it is considered correct :)


In reply to Re: Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1 by tybalt89
in thread Fastest way to sort a list of integers into 0,1,2,3,-3,-2,-1 by haukex

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.