Re: [xml] Profiling and possible speed improvements



Daniel Veillard wrote:

  Seems that we would need to keep the Shell's Sort for target where
qsort is not available or broken (I have had hell in the past for rpm2html
use of qsort on some old Solaris)...

My point was not about unavailable or broken qsorts, but about data size.

We should also keep in mind that qsort() performs badly on already sorted
data.

  Maybe the trade-off is to use either depending on the size of the
set of the node list to sort.

Yes, that sounds like a good approach (although determining the break-even
point can be difficult).

There is, however, another good reason to replace Shell's Sort. It does
not preserve the original order of equal entries.

  Is that an XSLT requirement ?

I believe it is. Section 10 (near the end) says:

  "in the sorted list of nodes, any sub list that has sort keys that all
   compare equal must be in document order".



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]