xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] StackOverflowError compiling XOM
- From: Elliotte Harold <elharo AT metalab.unc.edu>
- To: cowwoc <cowwoc AT bbs.darktech.org>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] StackOverflowError compiling XOM
- Date: Mon, 14 Jul 2008 06:10:17 -0700
cowwoc wrote:
There should definitely be a better way of mapping characters than dumping a whole slew of if statements into a method. Have you tried asking on the Java discussion forums?
There are such ways and I use them, but the goal is maximum efficiency at runtime, not working around compiler bugs. This is a real hot spot in XOM and some serious effort has gone into optimizing every last millisecond out of this. Check out my chapter in Beautiful Code for the details sometime.
The simple fact is that the most efficient way is table lookup (O(1)) based on carefully constructed switch statements with no holes. If it's legal code and a compiler can't handle it, then get a better compiler. I'm not going to slow XOM down to work around compiler bugs.
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
Refactoring HTML Just Published!
http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
-
[XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/09/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 07/09/2008
- <Possible follow-up(s)>
-
[XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Michael Kay, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Rusty Harold, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Harold, 07/14/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/14/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, cowwoc, 07/14/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, cowwoc, 07/15/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 07/15/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Elliotte Harold, 07/15/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/14/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Harold, 07/14/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
cowwoc, 07/10/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Elliotte Rusty Harold, 07/10/2008
- Re: [XOM-interest] StackOverflowError compiling XOM, Michael Kay, 07/11/2008
-
Re: [XOM-interest] StackOverflowError compiling XOM,
Michael Kay, 07/10/2008
Archive powered by MHonArc 2.6.24.