Subject: Re: SGML to HTML with jade? From: "James Clark" <jjc@xxxxxxxxxx> Date: Thu, 26 Jun 1997 11:59:48 +0700 |
> Mark> Now I've got your attention, how about this index creation > Mark> nightmare? I guess we're all waiting for James to fill in some > Mark> of the gaps in Jade. > > Surely that's the thing that really should be done externally to get > it right Why? I had a glance a Mark's code, and I could see two things that would make it very slow. Firstly it's using a O(n^2) sorting algorithm (insertion sort). Secondly it's mapping characters to integers once every time strings are compared. I would suggest instead: - building a list of entries: each entry is a pair of a sort-key and a sosofo; the sort-key is a list of integers (or maybe a list of list of integers). - sorting the list of entries using a merge sort. The only major inefficiency with this is the mapping of characters to integers, but this would be done exactly once for each index entry, so I doubt it would be a big problem. This could be avoided if Jade did a better job of optimizing case expressions, or if I added a (unicode-code char) external procedure that returned the Unicode code for the character. James DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: SGML to HTML with jade?, Dave Love | Thread | Re: SGML to HTML with jade?, Mark Burton |
Re: DSSSL query feature, James Clark | Date | Re: More thoughts on multiple style, James Clark |
Month |