pugixml

Light-weight, simple and fast XML parser for C++ with XPath support

Repository: Downloads: Documentation: Support:

Benchmarks

These charts summarize the performance and memory consumption comparison between pugixml and other XML parsers.

The time measured is the time to parse the document from memory; for DOM parsers, this involves the DOM tree construction, for SAX parsers this involves parsing the entire document with dummy handlers, for pull parsers this involves just parsing the entire document. In order to account for timing noise, the benchmark is run many times, and the minimum run time is recorded.

The memory consumption is the peak value of allocated memory during the parsing process; it is only displayed for DOM parsers, since SAX/pull parsers usually have more or less constant memory consumption.

All tests were performed with Microsoft Visual Studio 2015, with all optimizations on and with all parsers operating in their default modes (i.e., no custom tuning has been performed). The timing results were recorded on a Intel Core i7 @ 2.67 GHz.

Benchmarks are performed on nine different test files; all of them are in 1-20 Mb range and display a different range of markup/content ratios - e.g. there’s a COLLADA file that has little markup, there’s a book file that has almost no markup, there are some files where there is a lot of markup and almost no content, etc. The test files include a 10 Mb XMark test file.

Due to a number of test files all results are normalized using pugixml results as a baseline - the ratio between time or memory for a particular parser to pugixml is displayed (so if it’s 1 or more then the parser is slower or takes more memory than pugixml). Note that the horizontal axis is using logarithmic scale.

Benchmark results are visualized using Google Charts and require JavaScript and SVG support to render.

Parsing time (x86) relative to pugixml, lower is better
Parsing memory (x86) relative to pugixml, lower is better
Parsing time (x64) relative to pugixml, lower is better
Parsing memory (x64) relative to pugixml, lower is better