diff options
| -rw-r--r-- | docs/index.html | 84 | 
1 files changed, 82 insertions, 2 deletions
| diff --git a/docs/index.html b/docs/index.html index 74e3283..13d28b6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -27,6 +27,7 @@    </dt>
    <dt><a href="#Parsing">Parsing process</a></dt>
    <dt><a href="#Compliance">W3C compliance</a></dt>
 +  <dt><a href="#ComparisonTable">Comparison with existing parsers</a></dt>
    <dt><a href="#FAQ">FAQ</a></dt>
    <dt><a href="#Bugs">Bugs</a></dt>
    <dt><a href="#Future_work">Future work</a></dt>
 @@ -46,11 +47,12 @@ from scratch). The main features (call it USP) are:</p>  <ul>
  <li>low memory consumption and fragmentation (the win over <i>pugxml</i> is ~1.3 times, <i>TinyXML</i>
 -- ~2.5 times, <i>Xerces (DOM)</i> - ~4.3 times <a href="#annot-1"><sup>1</sup></a>)</li>
 +- ~2.5 times, <i>Xerces (DOM)</i> - ~4.3 times <a href="#annot-1"><sup>1</sup></a>). Exact numbers can
 +be seen in <a href="#ComparisonTable">Comparison with existing parsers</a> section.</li>
  <li>extremely high parsing speed (the win over <i>pugxml</i> is ~6 times, <i>TinyXML</i> - ~10
  times, <i>Xerces-DOM</i> - ~17.6 times <a href="#annot-1"><sup>1</sup></a></li>
  <li>extremely high parsing speed (well, I'm repeating myself, but it's so fast, that it outperforms
 -<i>expat</i> by <b>2.8 times</b> on test XML) <a href="#annot-2"><sup>2</sup></a></li>
 +<i>Expat</i> by <b>2.8 times</b> on test XML) <a href="#annot-2"><sup>2</sup></a></li>
  <li>more or less standard-conformant (it will parse any standard-compliant file correctly in w3c-compliance
  mode, with the exception of DTD related issues and XML namespaces)</li>
  <li>pretty much error-ignorant (it will not choke on something like <text>You & Me</text>,
 @@ -937,6 +939,84 @@ parsers already.</p>  <hr>
 +<a name="ComparisonTable">
 +<h2>Comparison with existing parsers</h2>
 +
 +<p>This table summarizes the comparison in terms of time and memory consumption between pugixml and
 +other parsers. For DOM parsers (all, except Expat, irrXML and SAX parser of XercesC), the process is
 +as follows:</p>
 +
 +<ul>
 +<li>construct DOM tree from file, which is preloaded in memory (all parsers take const char* and size
 +as an input). 'parse time' means number of CPU clocks which is spent, 'parse allocs' - number of allocations,
 +'parse memory' - peak memory consumption
 +<li>traverse DOM tree to fill information from it into some structure (which is the same for all parsers,
 +of course). 'walk time' means number of CPU clocks which is spent, 'walk allocs' - number of allocations
 +</ul>
 +
 +<p>For SAX parsers, the parse step is skipped (hence the N/A in relevant table cells), structure is
 +filled during 'walk' step.</p>
 +
 +<p>For all parsers, 'total time' column means total time spent on the whole process, 'total allocs' -
 +total allocation count, 'total memory' - peak memory consumption for the whole process.</p>
 +
 +<p>The tests were performed on a 1 Mb XML file with a small amount of text. They were compiled with
 +Microsoft Visual C++ 8.0 (2005) compiler in Release mode, with checked iterators/secure STL turned
 +off. The test system is AMD Sempron 2500+, 512 Mb RAM.</p>
 +
 +<table cellspacing=0 cellpadding=2 border=1>
 +
 +<tr><th>parser</th>
 +<th>parse time</th><th>parse allocs</th><th>parse memory</th>
 +<th>walk time</th><th>walk allocs</th>
 +<th>total time</th><th>total allocs</th><th>total memory</th></tr>
 +
 +<tr><td><a href="http://xml.irrlicht3d.org/">irrXML</a></td>
 +<td>N/A</td><td>N/A</td><td>N/A</td>
 +<td>352 Mclocks</td><td>697 245</td>
 +<td>356 Mclocks</td><td>697 284</td><td>906 kb</td></tr>
 +
 +<tr><td><a href="http://expat.sourceforge.net/">Expat</a></td>
 +<td>N/A</td><td>N/A</td><td>N/A</td>
 +<td>97 Mclocks</td><td>19</td>
 +<td>97 Mclocks</td><td>23</td><td>1028 kb</td></tr>
 +
 +<tr><td><a href="http://tinyxml.sourceforge.net/">TinyXML</a></td>
 +<td>168 Mclocks</td><td>50 163</td><td>5447 kb</td>
 +<td>37 Mclocks</td><td>0</td>
 +<td>242 Mclocks</td><td>50 163</td><td>5447 kb</td></tr>
 +
 +<tr><td><a href="http://www.codeproject.com/soap/pugxml.asp">PugXML</a></td>
 +<td>100 Mclocks</td><td>106 597</td><td>2747 kb</td>
 +<td>38 Mclocks</td><td>0</td>
 +<td>206 Mclocks</td><td>131 677</td><td>2855 kb</td></tr>
 +
 +<tr><td><a href="http://xml.apache.org/xerces-c/">XercesC</a> SAX</td>
 +<td>N/A</td><td>N/A</td><td>N/A</td>
 +<td>411 Mclocks</td><td>70 380</td>
 +<td>411 Mclocks</td><td>70 495</td><td>243 kb</td></tr>
 +
 +<tr><td><a href="http://xml.apache.org/xerces-c/">XercesC</a> DOM</td>
 +<td>300 Mclocks</td><td>30 491</td><td>9251 kb</td>
 +<td>65 Mclocks</td><td>1</td>
 +<td>367 Mclocks</td><td>30 492</td><td>9251 kb</td></tr>
 +
 +<tr><td>pugixml</td>
 +<td>17 Mclocks</td><td>40</td><td>2154 kb</td>
 +<td>14 Mclocks</td><td>0</td>
 +<td>32 Mclocks</td><td>40</td><td>2154 kb</td></tr>
 +
 +<tr><td>pugixml (test of non-destructive parsing)</td>
 +<td>12 Mclocks</td><td>51</td><td>1632 kb</td>
 +<td>21 Mclocks</td><td>0</td>
 +<td>34 Mclocks</td><td>51</td><td>1632 kb</td></tr>
 +
 +</table>
 +
 +<p>Note, that non-destructive parsing mode was just a test and is not yet in <i>pugixml</i>.</p>
 +
 +<hr>
 +
  <a name="FAQ">
  <h2>FAQ</h2>
 | 
