[Home] [By Thread] [By Date] [Recent Entries]

  • From: Elliotte Harold <elharo@m...>
  • To: derek denny-brown <zuligag@g...>
  • Date: Fri, 02 Mar 2007 16:04:35 -0500

derek denny-brown wrote:

> Except that we are talking about the performance of XML parsers, and
> XML is all about string processing and Java string processing is slow.
> Java XML parsing will never be faster than a good XML parser written
> in C.  There is just too much overhead, and C benefits from 'struct's,
> the lack of which hinders ones ability to write certain constructs
> efficiently in Java.   

My god! Are we moving back on topic? Has this ever happened before? `-)

Even if your assertions about string processing are true, there's no 
rule that says you have to use strings to write an XML processor. Off 
the top of my head I can think of three XML libraries/APIs for Java that 
deliberately avoid java.lang.String for some of their work.

If performance were really a concern, and String proved to be the real 
bottleneck, it's entirely possible someone could write an XML API based 
on bytes rather than strings. So far I don't think anyone's really had 
the motivation to do so. Either it hasn't been shown that strings are 
the problem, or they're not a big enough problem that anyone wants to 
take the time to fix them.

-- 
Elliotte Rusty Harold  elharo@m...
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member