Re: [xml] Profiling and possible speed improvements



On Wednesday 24 April 2002 9:45 pm, Daniel Veillard wrote:
On Wed, Apr 24, 2002 at 06:10:01PM +0000, Bjorn Reese wrote:
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.

  Hum, I got another mail from Frodo explaining that after some fixing the
qsort version is actually slower... false alert it seems.

Probably due to the fact that usually the nodes are in the right order anyway.

How about merge sort? It has much better performance characteristics on 
pre-sorted nodes, and is only slightly slower than qsort on large data sets.

Matt.



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