Skip to content


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. The reported time is measured in ticks (processor clocks) per input character; 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 2010, 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.

There are four test files, cathedral.xml (1 Mb), employees-big.xml (10 Mb), house.dae (6 Mb) and terrover.xml (16 Mb). First two of these are synthetic files (first one has relatively many attributes, second one has relatively many PCDATA), the third one is a COLLADA file (relatively little markup), and the last one is a level file from a video game.




You can get benchmark sources and data files here; parser sources are not included in the download because of licensing issues, so in order to build the benchmark you’ll have to get the parsers and put relevant sources where the project file expects them.


Get every new post delivered to your Inbox.

%d bloggers like this: