[XOM-interest] StackOverflowError compiling XOM
Elliotte Harold
elharo at metalab.unc.edu
Mon Jan 12 09:26:42 EST 2009
cowwoc wrote:
>
> I've generated a replacement for UnicodeUtil.getCombiningClass()
> that consists of 223 lines of code and runs approximately 20x faster
> than the original code (which consists of 1143 lines of code). Please
> see the attached file.
>
I've looked into this, and I see why that method is the way it is. It's
autogenerated by parsing
http://www.unicode.org/Public/UNIDATA/extracted/DerivedCombiningClass.txt
in a fairly naive fashion. If you look at that file, you'll notice that
it's layout is the sdame order as the if statements in UnicodeUtil.
I would like to keep autogenerating this code from the Unidata files
because that's more reliable going down the road, especially as future
Unicode versions are released. It also hopefully avoids obscure bugs due
to typos. However I can rewrite the autogeneration code to make it
somewhat less naive, and to produce something a lot smaller and closer
to what you came up with. I'm working on that now.
--
Elliotte Rusty Harold elharo at metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
More information about the XOM-interest
mailing list