[cxml-devel] characters.lisp improvements

David Lichteblau david at lichteblau.com
Tue Jun 13 18:01:45 UTC 2006


Hi,

Quoting Nathan Bird (nathan at acceleration.net):
> Doing some profiling I found a good portion of time and memory was being
> spent in rune-in-range-p among others. Investigating the source I found a
> comment in german that google translates into something like "that can be
> done nevertheless better". So I did.

first of all, thank you very much for working on speed issues.

However, I have to admit that my characters.lisp duplicates work already
done by Gilbert.  Gilbert's functions are in xml-name-rune-p.lisp and
are using inline functions accessing bitvectors.  Embarrassingly, I
didn't notice the latter file before writing characters.lisp and then
just stuck a comment into the file instead of fixing it right away.
My apologies for that -- and sorry for writing that comment in german.  :-(

> We now use a binary search instead of a linear search. Type declarations
> (simple-vector) helped a bit on sbcl.  As well as  rune-name-char-p had been
> calling rune-in-range-p with each of a bunch of different lists.  So I
> combined these lists at compile time, and search through the sorted list
> once.

That seems cool, but it would really be good to see how fast the bit
vector implementation is compared to binary search, and then to unify
the two files, probably by dropping one of them.


It would be great if you have the time to do this, otherwise I will
eventually look at it myself.


Thank you,
David



More information about the cxml-devel mailing list