Perhaps this is mysteries that are beyond my ken, but reading through this thread I am quite puzzled by the number fifteen.   That is quite a remarkable difference, especially when the sort-algorithm does not change.   In the end, what is it about this algorithm that produces essentially a 2**4-fold improvement?   And, does this improvement hold in a linear fashion as the number of records grows (but stays within the confines of the available process working-set)?

It is, of course, quite clear how it works:   the list is sorted irrespective of name, then partitioned into manager vs. non-manager, then one sorted sublist is put in front of the other.   But fifteen is still a very counter-intuitive spread between the two ... I feel reluctant to shout “eureka!” based on just this.


In reply to Re: Unusual sorting requirements; comparing three implementations. by sundialsvc4
in thread Unusual sorting requirements; comparing three implementations. by tobyink

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.