Skip to content

pugixml 0.9 release

July 11, 2010

pugixml-0.9 is out. This is a major release with lots of fixes/improvements (read the changelog for the details). The most important changes are:

  • Unicode support is completely reworked: now pugixml can be configured to use wchar_t instead of char for all string-based interfaces; also encoding conversion is performed during parsing/saving (with automatic encoding detection). All popular Unicode encodings are supported.
  • New version features a new documentation, with detailed description of library interface and behavior, more samples, quick-start guide and so on.
  • There are new functions for loading document from memory; they do not require the input buffer to be null-terminated. Old functions still work, but are deprecated and will be removed in the future version.

Also there are a lot of other changes, including performance and memory consumption improvements.

About these ads
2 Comments leave one →
  1. jimmyzhang permalink
    January 3, 2011 12:50 pm

    interesting results on performance comparison, what is the difference between pugXML and pugiXML’s memory usage? base on the struct, the node struture isn’t much different, where does the improvement come from?

    • January 4, 2011 10:11 am

      1. On a 32-bit system, pugixml has 32b node and 20b attribute; pugxml has 48b node and 16b attribute.

      2. Additionally pugixml allocates all nodes with a custom allocator without any per-allocation metadata, whereas pugxml has an additional 8-16 bytes (depending on the system allocator) overhead for each allocation (1 for node, 1 for attribute)

      3. pugxml wastes additional space on pointer arrays (attributes & children) inside each node – there is some useful data there (i.e. actual pointers), there’s the allocation overhead, and there is some wasted space because of unused elements (the arrays grow by 4 pointers at a time, i.e. 6b on average is wasted here).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: