Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
It doesn't work.

Really?

Well, it does work,

Oh...

but only if the XFORM routine returns a string of the same length for every item.

"only"? (:

Actually, it always works if the fields are fixed-length. It also always works if the fields don't contain "\0" characters and you don't have more than 16 million records. Those two cases cover almost every sort I do.

It often works when these guarentees don't apply.

It is also fairly easy to fix it so it always works even if you have fields with lots of trailing null bytes. For example, a s#([\00\01])#\01$1#g and join "\0", is enough.

I noticed the potential for this problem quite a while ago and hoped to address it in the module based on this idea, but working on such a module hasn't made it to the top of my list yet. Thanks for motivating me to address the problem here. :)

- tye        


In reply to Re^2: fast, flexible, stable sort (works?) by tye
in thread fast, flexible, stable sort by tye

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 having a coffee break in the Monastery: (4)
As of 2024-03-29 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found