Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Performance of Java XPath engines

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Steve Loughran <steve.loughran AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Performance of Java XPath engines
  • Date: Fri, 21 Jan 2005 11:02:26 +0000

On Fri, 21 Jan 2005 16:52:32 +0900 (JST), shirasu hiroyuki
<hirsh AT s9.dion.ne.jp> wrote:
> From: Steve Loughran <steve.loughran AT gmail.com>
> Subject: Re: [XOM-interest] Performance of Java XPath engines
> Date: Thu, 20 Jan 2005 12:47:57 +0000
>
> <snip/>
>
> > Another interesting question is the impace of caching. If you have an
> > XML file big enough that the parsed graph is bigger than $L2 cache,
> > then you have to hit main memory to navigate around it. As Java (and
> > .NET) lack anyway to put prefetch hints in the code, the only way to
> > differentiate your navigation performance is by using algorithms
> > optimised for different memory speeds. I dont know if any
> > implementations do, but big file testing is the way to see.
> >
> > What were the file sizes of the tests?
>
>
> I used one file. Its size was 230k.
> I apologize for having less knowledge of $L2 cache and so on.

no, no need to apologise at all. It is usually something most people
dont need to care about it, and Sun go out their way to hide
developers from the details.

Some of the x86/win32 issues are documented here:
http://iseran.com/Win32/CodeForSpeed/memory.html

x86 and other systems have a non-faulting prefetch opcode, so you can
insert prefetch instructions as you walk a graph. For example, in a
binary tree, you could prefetch both left and right branches to $L2 or
$L1 cache, before even looking at the contents of the current node.
Then whichever way you branch, you get speedup on the next operation.

It would have been nice if Java opcodes also had a prefetch command,
with a language equivalent, so that at least the core java.utils
datastructures could be written with cache-awareness. But no, you dont
get it, which is a shame.

I just had a look on google scholar to see what there is on XML+cache misses.

There is work on databases (
http://domino.research.ibm.com/acas/w3www_acas.nsf/images/projects_02.03/$FILE/teller.pdf
), work which justify the many hundreds of dollars price differential
between Xeon and Celeron parts, and some stuff on Java -
http://www.it.uu.se/research/reports/lic/2003-009/2003-009.pdf - but
not much.

Yours could be the first paper on efficient XML performance :)

-steve




Archive powered by MHonArc 2.6.24.

Top of Page