Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2021-10-19 17:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (77 votes). Check out past polls.

    Notices?