Re: [xml] Profiling and possible speed improvements
- From: Daniel Veillard <veillard redhat com>
- To: Bjorn Reese <breese mail1 stofanet dk>
- Cc: xml gnome org
- Subject: Re: [xml] Profiling and possible speed improvements
- Date: Wed, 24 Apr 2002 16:45:36 -0400
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.
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).
Yup
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".
That on the other hand sounds like it ought to be fixed. Nobody complained
yet, but ... seems it's actually something to be done in the comparison
function, right ?
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]