[jdom-interest] Performance measurements with Saxon

Michael Kay mike at saxonica.com
Thu Sep 13 00:08:01 PDT 2012


JDOM2 is now working as an external object model for Saxon.

We've done some performance measurements which are summarised here:

http://dev.saxonica.com/blog/mike/2012/09/index.html#000194

These figures show that of all the external object models, JDOM2 now 
comes second (to XOM) in the league. The Saxon driver for XOM is 
probably the most carefully tuned of all the drivers, which may have 
something to do with it; also, I believe that XOM added features 
explicitly for Saxon's use, to make sorting of nodes into document order 
more efficient.

A more detailed breakdown of the results for JDOM1 and JDOM2 is given 
below. The first group of results are for JDOM1, the second group for 
JDOM2. For each query in the XMark benchmark, they show the execution 
time in seconds running against a 1Mb source document; the driver 
executes each query repeatedly until 1000 iterations or 30 seconds have 
elapsed.

There's a consistent speed-up between JDOM and JDOM2. In the cases where 
the speed-up is greatest, however, this is in part because of 
improvements in the Saxon "wrapper": instead of using our own 
general-purpose implementation of the descendant axis, we now make use 
of Parent.getDescendants().

In this measurements, JDOM2 has slightly lower memory requirements but 
slightly higher tree-building time; but I wouldn't be 100% confident 
that either figure is consistent.

Our intention is to release Saxon 9.5 (when it's ready) with support for 
both JDOM and JDOM2.

Michael Kay
Saxonica


<file name='xmark1.xml' size='1182530' build-time='177' model='JDOM' 
memory ='8134'>
     <query q='1' avg='0.0434' runs='1000' totalTime='43.43' min='0.029' 
max='3.972'/>
     <query q='2' avg='0.4819' runs='1000' totalTime='481.868' 
min='0.337' max='5.315'/>
     <query q='3' avg='1.0899' runs='1000' totalTime='1089.948' 
min='0.969' max='2.558'/>
     <query q='4' avg='1.5925' runs='1000' totalTime='1592.505' 
min='1.433' max='3.153'/>
     <query q='5' avg='0.4373' runs='1000' totalTime='437.323' 
min='0.393' max='1.86'/>
     <query q='6' avg='3.2641' runs='1000' totalTime='3264.132' 
min='2.903' max='13.66'/>
     <query q='7' avg='32.0029' runs='938' totalTime='30018.766' 
min='30.027' max='37.01'/>
     <query q='8' avg='0.8698' runs='1000' totalTime='869.766' 
min='0.763' max='2.431'/>
     <query q='9' avg='1.7617' runs='1000' totalTime='1761.683' 
min='1.568' max='3.374'/>
     <query q='10' avg='10.7680' runs='1000' totalTime='10768.033' 
min='9.8' max='13.822'/>
     <query q='11' avg='9.7112' runs='1000' totalTime='9711.212' 
min='8.829' max='15.248'/>
     <query q='12' avg='4.6301' runs='1000' totalTime='4630.111' 
min='4.109' max='7.201'/>
     <query q='13' avg='0.3274' runs='1000' totalTime='327.411' 
min='0.293' max='1.775'/>
     <query q='14' avg='14.1613' runs='1000' totalTime='14161.263' 
min='12.562' max='20.487'/>
     <query q='15' avg='0.5781' runs='1000' totalTime='578.14' 
min='0.52' max='1.771'/>
     <query q='16' avg='0.6172' runs='1000' totalTime='617.174' 
min='0.534' max='1.997'/>
     <query q='17' avg='0.7195' runs='1000' totalTime='719.461' 
min='0.637' max='2.322'/>
     <query q='18' avg='0.5705' runs='1000' totalTime='570.47' 
min='0.497' max='2.022'/>
     <query q='19' avg='5.5182' runs='1000' totalTime='5518.223' 
min='4.844' max='7.556'/>
     <query q='20' avg='1.9923' runs='1000' totalTime='1992.329' 
min='1.753' max='6.643'/>
   </file>
   <file name='xmark1.xml' size='1182530' build-time='183' model='JDOM2' 
memory ='7773'>
     <query q='1' avg='0.0378' runs='1000' totalTime='37.838' 
min='0.026' max='5.509'/>
     <query q='2' avg='0.3790' runs='1000' totalTime='379.04' 
min='0.274' max='3.457'/>
     <query q='3' avg='0.8383' runs='1000' totalTime='838.316' 
min='0.719' max='2.788'/>
     <query q='4' avg='1.3373' runs='1000' totalTime='1337.258' 
min='1.178' max='2.953'/>
     <query q='5' avg='0.3276' runs='1000' totalTime='327.579' 
min='0.29' max='1.705'/>
     <query q='6' avg='1.1274' runs='1000' totalTime='1127.373' 
min='0.962' max='12.582'/>
     <query q='7' avg='12.8199' runs='1000' totalTime='12819.935' 
min='11.156' max='18.008'/>
     <query q='8' avg='0.7705' runs='1000' totalTime='770.534' 
min='0.672' max='2.457'/>
     <query q='9' avg='1.4613' runs='1000' totalTime='1461.321' 
min='1.293' max='3.12'/>
     <query q='10' avg='8.4250' runs='1000' totalTime='8425.017' 
min='7.513' max='13.53'/>
     <query q='11' avg='8.2320' runs='1000' totalTime='8232.022' 
min='7.291' max='10.199'/>
     <query q='12' avg='3.9453' runs='1000' totalTime='3945.34' 
min='3.397' max='6.636'/>
     <query q='13' avg='0.2792' runs='1000' totalTime='279.209' 
min='0.238' max='1.696'/>
     <query q='14' avg='7.7460' runs='1000' totalTime='7746.036' 
min='6.571' max='17.92'/>
     <query q='15' avg='0.4121' runs='1000' totalTime='412.139' 
min='0.362' max='1.908'/>
     <query q='16' avg='0.4590' runs='1000' totalTime='458.988' 
min='0.403' max='1.946'/>
     <query q='17' avg='0.5415' runs='1000' totalTime='541.546' 
min='0.478' max='2.134'/>
     <query q='18' avg='0.4260' runs='1000' totalTime='426.003' 
min='0.375' max='1.949'/>
     <query q='19' avg='2.7080' runs='1000' totalTime='2707.965' 
min='2.347' max='4.386'/>
     <query q='20' avg='1.5237' runs='1000' totalTime='1523.655' 
min='1.369' max='3.129'/>
   </file>




More information about the jdom-interest mailing list