in reply to Re^2: sort function and parity of the permutation.
in thread sort function and parity of the permutation.
“Let’s not go there, shall we?” BrowserUK’s point is, or could be, a valid one. And so, I will always assume only the best of intentions from anyone and everyone who meditates in this castle: “It is valid, and honorably bespoke.”
You might not be able to obtain the “parity” of a sort algorithm in the traditional sense ... and, like BrowserUK, I rather wonder for what purpose you actually need it. Perhaps some kind of record-by-record comparison of the original vs. the sorted streams might produce a useful alternative metric.
Is the purpose of the OP’s question to ascertain some useful characteristic of the data, or of a particular algorithm? If Perl no longer uses that algorithm (which is undoubtedly the case), does this invalidate the question as-asked? (If it does, then we need to find an alternate question to ask, such that the answer, although a different answer, serves the same useful purpose.)