Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Thanks for pointing that out! I knew something was wrong with those numbers, but for the life of me, couldn't figure out what. Tossing in a print statement to check the return value obviously didn't help things :-)

Regarding my sort routine, if you run my updated version (your scores look like the original) on a Perl 5.6.1, you should find that it's the fastest until about 10,000 elements, at which point arhuman's begins to take the lead:

Comparing for 1000 elements Rate myo st tye ah mc myo 18.4/s -- -61% -72% -78% -83% st 46.9/s 154% -- -29% -43% -58% tye 66.5/s 261% 42% -- -20% -40% ah 82.7/s 348% 76% 24% -- -25% mc 111/s 500% 136% 66% 34% -- Comparing for 2500 elements Rate myo st tye ah mc myo 7.46/s -- -54% -69% -76% -78% st 16.3/s 118% -- -32% -47% -51% tye 24.0/s 222% 48% -- -22% -28% ah 31.0/s 315% 90% 29% -- -8% mc 33.5/s 349% 106% 39% 8% -- Comparing for 10000 elements Rate myo st tye mc ah myo 1.36/s -- -53% -68% -76% -78% st 2.88/s 112% -- -33% -49% -55% tye 4.29/s 214% 49% -- -25% -32% mc 5.69/s 317% 97% 33% -- -10% ah 6.34/s 365% 120% 48% 12% --
Perl 5.6 gives rather different results though...
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

In reply to Re: (tye)Re3: Substring Sort by MeowChow
in thread Substring Sort by Anonymous Monk

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 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?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 23:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found